Ethernet header compression method and apparatus and ethernet header decompression method and apparatus

ABSTRACT

An Ethernet header compression method and apparatus and an Ethernet header decompression method and apparatus. After receiving an Ethernet frame including a first to-be-compressed field, a compression end compresses an Ethernet header of the Ethernet frame based on a first correspondence including first compression information and a value of the first to-be-compressed field and the first compression information. Correspondingly, a decompression end decompresses an Ethernet header of a compressed Ethernet frame based on the first correspondence when receiving the compressed Ethernet frame. In the embodiments of this application, because the Ethernet header of the Ethernet frame is compressed, communication resources is saved.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2019/100900, filed on Aug. 15, 2019, the disclosure of which ishereby incorporated by reference in its entirety.

BACKGROUND

In a conventional industrial control field, automatic control isimplemented through a wired connection. However, a wired connectiondeployment manner makes cable deployment and maintenance costs high, andmobility of a controlled end is poor due to a limitation of a cable.Therefore, industrial control using wireless transmission instead of thewired connection has gained more and more attention. An Ethernettechnology is used for most industrial control networks duringdeployment. When a wired network is replaced with a wireless network, anEthernet frame is transmitted between a control end and a controlled endthrough the wireless network. Therefore, the Ethernet frame needs to betransmitted in the wireless network. Transmission of the Ethernet framein the wireless network uses high resource overheads, but radioresources are limited. Therefore, overheads of the transmission of theEthernet frame in the wireless network is expected to be reduced.

SUMMARY

This application provides an Ethernet header compression method andapparatus and an Ethernet header decompression method and apparatus, toreduce occupation of Ethernet communication resources by an Ethernetheader.

According to a first aspect, an Ethernet header compression method isprovided, including: receiving, by a compression end, a first Ethernetframe, where an Ethernet header of the first Ethernet frame includes afirst to-be-compressed field; determining, by the compression end, firstcompression information of the Ethernet header of the first Ethernetframe based on a first correspondence and the first to-be-compressedfield, where the first correspondence includes a correspondence betweenthe first compression information and a value of the firstto-be-compressed field, and the first compression information includes afirst context identifier CID; and compressing, by the compression end,the Ethernet header of the first Ethernet frame based on the firstcompression information.

In addition, a compression apparatus is provided, including a unit or ameans (means) configured to perform each step in the foregoing firstaspect.

In addition, a compression apparatus is provided, including a processorand an interface circuit. The processor is configured to: communicatewith another apparatus through the interface circuit, and perform themethod provided in the first aspect. There are one or more processors.

In addition, a compression apparatus is provided, including a processor,configured to invoke a program stored in a memory, to perform the methodprovided in the first aspect. The memory is located inside theapparatus, or is located outside the apparatus. In addition, there areone or more processors.

In addition, a computer program is provided. When the program is invokedby a processor, the method provided in the first aspect is performed.

In addition, a computer-readable storage medium is provided, includingthe foregoing program.

After receiving the first Ethernet frame including the firstto-be-compressed field, the compression end compresses the Ethernetheader of the first Ethernet frame based on the first correspondenceincluding the first compression information and the value of the firstto-be-compressed field and the first compression information. Becausethe Ethernet header of the first Ethernet frame is compressed,communication resources is saved.

Optionally, in the first aspect or various implementations of the firstaspect, the first correspondence is generated when a correspondencestored by the compression end does not include the value of the firstto-be-compressed field of the first Ethernet frame, where thecorrespondence stored by the compression end includes a correspondencebetween at least one piece of compression information and a value of ato-be-compressed field.

Optionally, in the first aspect or various implementations of the firstaspect, the compression end sends the first correspondence to adecompression end.

Optionally, in the first aspect or various implementations of the firstaspect, the sending, by the compression end, the first correspondence toa decompression end includes: sending, by the compression end, anuncompressed data packet to the decompression end, where theuncompressed data packet includes the first correspondence.

Optionally, in the first aspect or various implementations of the firstaspect, the sending, by the compression end, the first correspondence toa decompression end includes: sending, by the compression end, the firstcorrespondence to the decompression end by using a first packet dataconvergence protocol data protocol data unit PDCP data PDU, where thefirst PDCP data PDU includes a first Ethernet header compression EHCheader, the first EHC header includes a first indication field, thefirst CID, and an Ethernet header of a second Ethernet frame, a value ofa to-be-compressed field in the Ethernet header of the second Ethernetframe is equal to the value of the first to-be-compressed field, and thefirst indication field is used to indicate whether the first EHC headerincludes a complete Ethernet header.

Optionally, in the first aspect or various implementations of the firstaspect, the first EHC header further includes a first profile identifierprofile ID.

Optionally, in the first aspect or various implementations of the firstaspect, the first indication field is further used to indicate that thefirst EHC header includes the first profile ID.

Optionally, in the first aspect or various implementations of the firstaspect, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, in the first aspect or various implementations of the firstaspect, the sending, by the compression end, the first correspondence toa decompression end includes:

sending, by the compression end, the first correspondence to thedecompression end by using a packet data convergence protocol controlprotocol data unit PDCP control PDU, where the PDCP control PDU includesfirst indication information, the first CID, and the value of the firstto-be-compressed field, and the first indication information is used toindicate that the PDCP control PDU is used to transmit the firstcorrespondence.

Optionally, in the first aspect or various implementations of the firstaspect, the PDCP control PDU further includes a first profile ID.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: sending, by the compression end, afirst PDCP data PDU to the decompression end, where the first PDCP dataPDU includes a first EHC header, the first EHC header includes a firstindication field and an Ethernet header of a second Ethernet frame, avalue of a to-be-compressed field in the Ethernet header of the secondEthernet frame is equal to the value of the first to-be-compressedfield, and the first indication field is used to indicate whether thefirst EHC header carries the first CID.

Optionally, in the first aspect or various implementations of the firstaspect, when the first EHC header carries the first CID, the Ethernetheader of the second Ethernet frame is a compressed Ethernet header; orwhen the first EHC header does not carry the first CID, the Ethernetheader of the second Ethernet frame is a complete Ethernet header.

Optionally, in the first aspect or various implementations of the firstaspect, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, in the first aspect or various implementations of the firstaspect, the sending, by the compression end, the first correspondence toa decompression end includes: sending, by the compression end, the firstcorrespondence to the decompression end for a plurality of times.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: receiving, by the compression end,feedback information from the decompression end, where the feedbackinformation is used to indicate a receiving status of the firstcorrespondence.

Optionally, in the first aspect or various implementations of the firstaspect, the feedback information includes the first CID.

Optionally, in the first aspect or various implementations of the firstaspect, the feedback information further includes at least one of thefollowing: the first profile ID, a second indication field, and a thirdindication field, the second indication field is used to indicate thatthe first correspondence is a newly added correspondence or a modifiedcorrespondence at the decompression end, and the third indication fieldis used to indicate that the feedback information is a positive feedbackor a negative feedback.

Optionally, in the first aspect or various implementations of the firstaspect, the compression end further stores an indication variable of thecorrespondence, and the indication variable is used to indicate whethercompression information of the correspondence is used for compression.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: sending, by the compression end,the first correspondence to a decompression end when a correspondencestored by the compression end includes the first correspondencecorresponding to the first to-be-compressed field, and an indicationvariable of the first correspondence is used to indicate thatcompression information of the first correspondence is not used forcompression.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: setting, by the compression end,the indication variable to a first value when the compression enddetermines that the first correspondence is correctly received by thedecompression end, where the first value is used to indicate that thecompression information is used for compression.

Optionally, in the first aspect or various implementations of the firstaspect, the first compression information further includes the firstprofile ID.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: sending, by the compression end,second indication information to the decompression end, where the secondindication information is used to indicate that the first correspondenceis a newly added correspondence or a modified correspondence at thecompression end.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: sending, by the compression end, acompressed first Ethernet frame to the decompression end, where thecompressed first Ethernet frame includes the first CID and does notinclude a profile identifier profile ID.

In this case, because the compressed Ethernet frame does not include theprofile ID, space occupation is reduced.

Optionally, in the first aspect or various implementations of the firstaspect, the sending, by the compression end, a compressed first Ethernetframe to the decompression end includes: sending, by the compressionend, the compressed first Ethernet frame to the decompression end byusing a second PDCP data PDU.

Optionally, in the first aspect or various implementations of the firstaspect, the second PDCP data PDU includes a second EHC header, and thesecond EHC header further includes check information.

Optionally, in the first aspect or various implementations of the firstaspect, the check information is generated based on one or more piecesof information in the first correspondence.

Optionally, in the first aspect or various implementations of the firstaspect, when the compression end receives an error report returned bythe decompression end based on the check information, the compressionend deletes the first correspondence, or the compression end sets thefirst correspondence to being unavailable.

Optionally, in the first aspect or various implementations of the firstaspect, the compression end is a terminal, the decompression end is anetwork device, and the method further includes:

-   -   sending, by the compression end, capability information to the        decompression end, where the capability information includes at        least one of the following: a capability of the compression end        supporting EHC, a quantity of data radio bearers DRBs supporting        the EHC at the compression end, profile information supported by        the compression end, a maximum value MAX_CID of a quantity of        correspondences supported by each DRB supporting the EHC, a        capability of the compression end supporting of dynamic        configuration of a profile parameter, and a sum of quantities of        correspondences maintained by DRBs supporting the EHC at the        compression end.

Optionally, in the first aspect or various implementations of the firstaspect, the compression end is a terminal, and the method furtherincludes: receiving, by the terminal, configuration information, wherethe configuration information is used to indicate whether an EHC headercarries a profile ID, or the configuration information includes aprofile ID.

Optionally, in the first aspect or various implementations of the firstaspect, the method further includes: receiving, by the compression end,capability information, where the capability information includes atleast one of the following: a capability of the compression endsupporting EHC, a quantity of data radio bearers DRBs supporting the EHCat the compression end, profile information supported by the compressionend, a maximum value MAX_CID of a quantity of correspondences supportedby each DRB supporting the EHC, a capability of the compression endsupporting dynamic configuration of a profile parameter, and a sum ofquantities of correspondences maintained by DRBs supporting the EHC atthe compression end.

Optionally, in the first aspect or various implementations of the firstaspect, the decompression end is a terminal, the compression end is anetwork device, and the method further includes: sending, by the networkdevice, configuration information to the decompression end, where theconfiguration information is used to indicate whether an EHC headercarries a profile ID, or the configuration information includes aprofile ID.

According to a second aspect, an Ethernet header decompression method isprovided, including: receiving, by a decompression end, a first Ethernetframe, where the first Ethernet frame includes a first contextidentifier CID; determining, by the decompression end based on the firstCID, a first correspondence including the first CID, where the firstcorrespondence includes a correspondence between first compressioninformation and a value of a first to-be-decompressed field, and thefirst compression information includes the first CID; and decompressing,by the decompression end, an Ethernet header of the first Ethernet framebased on the first compression information and the value of the firstto-be-decompressed field in the first correspondence.

In addition, a decompression apparatus is provided, including a unit ora means (means) configured to perform each step in the foregoing secondaspect.

In addition, a decompression apparatus is provided, including aprocessor and an interface circuit. The processor is configured to:communicate with another apparatus through the interface circuit, andperform the method provided in the second aspect. There are one or moreprocessors.

In addition, a decompression apparatus is provided, including aprocessor, configured to invoke a program stored in a memory, to performthe method provided in the second aspect. The memory is located insidethe apparatus, or is located outside the apparatus. In addition, thereare one or more processors.

In addition, a computer program is provided. When the program is invokedby a processor, the method provided in the second aspect is performed.

In addition, a computer-readable storage medium is provided, includingthe foregoing program.

When receiving a compressed first Ethernet frame, the decompression enddetermines the first correspondence based on the first CID in the firstEthernet frame, and decompress the Ethernet header of the compressedEthernet frame based on the first correspondence. In this embodiment ofthis application, because the Ethernet header of the Ethernet frame iscompressed, communication resources is saved.

Optionally, in the second aspect or various implementations of thesecond aspect, the method further includes: receiving, by thedecompression end, the first correspondence from a compression end.

Optionally, in the second aspect or various implementations of thesecond aspect, the receiving, by the decompression end, the firstcorrespondence from a compression end includes: receiving, by thedecompression end, an uncompressed data packet, where the uncompresseddata packet includes the first correspondence.

Optionally, in the second aspect or various implementations of thesecond aspect, the receiving, by the decompression end, the firstcorrespondence from a compression end includes: receiving, by thedecompression end, the first correspondence from the compression end byusing a PDCP data PDU, where the first PDCP data PDU includes a firstEthernet header compression EHC header, the first EHC header includes afirst indication field, the first CID, and an Ethernet header of asecond Ethernet frame, a value of a to-be-compressed field in theEthernet header of the second Ethernet frame is equal to the value ofthe first to-be-compressed field, and the first indication field is usedto indicate whether the first EHC header includes a complete Ethernetheader.

Optionally, in the second aspect or various implementations of thesecond aspect, the first EHC header further includes a first profileidentifier profile ID.

Optionally, in the second aspect or various implementations of thesecond aspect, the first indication field is further used to indicatethat the first EHC header includes the first profile ID.

Optionally, in the second aspect or various implementations of thesecond aspect, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, the receiving, by the decompression end, the firstcorrespondence from a compression end includes: receiving, by thedecompression end, the first correspondence from the compression end byusing a PDCP control PDU, where the PDCP control PDU includes firstindication information, the first CID, and the value of the firstto-be-compressed field, and the first indication information is used toindicate that the PDCP control PDU is used to transmit the firstcorrespondence.

Optionally, in the second aspect or various implementations of thesecond aspect, the PDCP control PDU further includes a first profile ID.

Optionally, in the second aspect or various implementations of thesecond aspect, the method further includes: receiving, by thedecompression end, a first PDCP data PDU from the compression end, wherethe first PDCP data PDU includes a first EHC header, the first EHCheader includes a first indication field and an Ethernet header of asecond Ethernet frame, a value of a to-be-compressed field in theEthernet header of the second Ethernet frame is equal to the value ofthe first to-be-compressed field, and the first indication field is usedto indicate whether the first EHC header carries the first CID.

Optionally, in the second aspect or various implementations of thesecond aspect, when the first EHC header carries the first CID, theEthernet header of the second Ethernet frame is a compressed Ethernetheader; or when the first EHC header does not carry the first CID, theEthernet header of the second Ethernet frame is a complete Ethernetheader.

Optionally, in the second aspect or various implementations of thesecond aspect, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, in the second aspect or various implementations of thesecond aspect, the decompression end stores a correspondence between atleast one piece of compression information and a value of ato-be-decompressed field, and the method further includes: storing, bythe decompression end, the first correspondence when the correspondencestored by the decompression end does not include the first compressioninformation; or modifying, by the decompression end, a value of ato-be-decompressed field corresponding to the first compressioninformation to the value of the first to-be-decompressed field when thecorrespondence stored by the decompression end includes the firstcompression information, and the value of the to-be-decompressed fieldcorresponding to the first compression information is different from thevalue of the first to-be-decompressed field.

Optionally, in the second aspect or various implementations of thesecond aspect, the method further includes: sending, by thedecompression end, feedback information to the compression end, wherethe feedback information is used to indicate a receiving status of thefirst correspondence.

Optionally, in the second aspect or various implementations of thesecond aspect, the feedback information includes the first CID.

Optionally, in the second aspect or various implementations of thesecond aspect, the feedback information further includes at least one ofthe following: a profile ID, a first indication field, and a secondindication field, the first indication field is used to indicate thatthe first correspondence is a newly added correspondence or a modifiedcorrespondence at the decompression end, and the second indication fieldis used to indicate that the feedback information is a positive feedbackor a negative feedback.

Optionally, in the second aspect or various implementations of thesecond aspect, the first Ethernet frame further includes first checkinformation.

Optionally, in the second aspect or various implementations of thesecond aspect, the first check information is generated based on one ormore pieces of information in the first correspondence.

Optionally, the method further includes: generating, by the compressionend, second check information based on the one or more pieces ofinformation in the first correspondence; and decompressing, by thedecompression end, the Ethernet header of the first Ethernet frame whenthe first check information is the same as the second check information;or deleting, by the decompression end, the first correspondence, and/orsending, by the decompression end, an error report to the compressionend when the first check information is different from the second checkinformation.

In conclusion, the embodiments of this application provide the Ethernetheader compression method and apparatus and the Ethernet headerdecompression method and apparatus. After receiving the first Ethernetframe including the first to-be-compressed field, the compression endcompresses the Ethernet header of first the Ethernet frame based on thefirst correspondence including the first compression information and thevalue of the first to-be-compressed field and the first compressioninformation. Correspondingly, the decompression end decompresses theEthernet header of the compressed first Ethernet frame based on thefirst correspondence when receiving the compressed first Ethernet frame.In the embodiments of this application, because the Ethernet header ofthe Ethernet frame is compressed, communication resources is saved.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a network architecture according to anembodiment of this application;

FIG. 2 is a schematic diagram of a control system according to anembodiment of this application;

FIG. 3 is a schematic diagram of another control system according to anembodiment of this application;

FIG. 4 is a schematic diagram of still another control system accordingto an embodiment of this application;

FIG. 5 is a schematic diagram in which a wireless communication networkis applied to a control network according to an embodiment of thisapplication;

FIG. 6 is a schematic diagram of another network architecture accordingto an embodiment of this application;

FIG. 7 is a schematic flowchart of a compression and decompressionmethod according to an embodiment of this application;

FIG. 8 is a schematic diagram of a format of an Ethernet frame accordingto an embodiment of this application;

FIG. 9 shows a format of a PDCP data PDU configured with an EHC headeraccording to an embodiment of this application;

FIG. 10 is a schematic diagram of a format of a first EHC headeraccording to an embodiment of this application;

FIG. 11 is a schematic diagram of a format of a second EHC headeraccording to an embodiment of this application;

FIG. 12 is a schematic flowchart of a method for synchronizing a firstcorrespondence between a compression end and a decompression endaccording to an embodiment of this application;

FIG. 13 is a schematic diagram of a format of feedback informationaccording to an embodiment of this application;

FIG. 14 is a schematic diagram of a format of a third EHC headeraccording to an embodiment of this application;

FIG. 15 is a schematic diagram of a format of a fourth EHC headeraccording to an embodiment of this application;

FIG. 16 is a schematic diagram of a format of a fifth EHC headeraccording to an embodiment of this application;

FIG. 17 is a schematic diagram of a format of a sixth EHC headeraccording to an embodiment of this application;

FIG. 18 is a schematic diagram of a format of a first PDCP data PDUaccording to an embodiment of this application;

FIG. 19 is a schematic diagram of a format of a second PDCP data PDUaccording to an embodiment of this application;

FIG. 20 is a schematic diagram of a format of a third PDCP data PDUaccording to an embodiment of this application;

FIG. 21 is a schematic diagram of a format of a fourth PDCP data PDUaccording to an embodiment of this application;

FIG. 22 is a schematic diagram of a format of a fifth PDCP data PDUaccording to an embodiment of this application;

FIG. 23 is a schematic diagram of a format of a seventh EHC headeraccording to an embodiment of this application;

FIG. 24 is a schematic diagram of a format of an eighth EHC headeraccording to an embodiment of this application;

FIG. 25 is a schematic diagram of an Ethernet frame compressionapparatus according to an embodiment of this application;

FIG. 26 is a schematic diagram of an Ethernet frame decompressionapparatus according to an embodiment of this application;

FIG. 27 is a schematic diagram of a structure of a network deviceaccording to an embodiment of this application;

FIG. 28 is a schematic diagram of a structure of a terminal deviceaccording to an embodiment of this application;

FIG. 29 is a schematic diagram of a structure of an Ethernet framecompression apparatus according to an embodiment of this application;and

FIG. 30 is a schematic diagram of a structure of an Ethernet framedecompression apparatus according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

Embodiments of this application provide an Ethernet header compressionmethod and apparatus and an Ethernet header decompression method andapparatus. FIG. 1 is a schematic diagram of a network architectureapplicable to embodiments of this application. As shown in FIG. 1, thenetwork architecture includes a compression end and a decompression end.

The compression end is a terminal or an execution unit in the terminal.For example, the execution unit in the terminal is a packet dataconvergence protocol (PDCP) entity, a radio link control (RLC) entity, aservice data adaptation protocol (SDAP) entity, or the like in theterminal, or an Ethernet header compression (EHC) processing module inan entity. Alternatively, the compression end is a network device, or anexecution unit in the network device. For example, the execution unit inthe network device is a PDCP entity, an RLC entity, an SDAP entity, orthe like in the network device, or an EHC processing module in anentity.

The decompression end is a terminal, or an execution unit in theterminal. For example, the execution unit in the terminal is a PDCPentity, an RLC entity, an SDAP entity, or the like in the terminal, oran EHC processing module in an entity. Alternatively, the decompressionend is a network device, or an execution unit in the network device. Forexample, the execution unit in the network device is a PDCP entity, anRLC entity, an SDAP entity, or the like in the network device, or an EHCprocessing module in an entity.

For example, in an application scenario of compressing and decompressingan uplink data stream, the compression end is a terminal, a PDCP entity,an RLC entity, an SDAP entity, or the like in the terminal, or an EHCprocessing module in an entity. The decompression end is a networkdevice, a PDCP entity, an RLC entity, an SDAP entity, or the like in thenetwork device, or an EHC processing module in an entity. In anapplication scenario of compressing and decompressing a downlink datastream, the compression end is a network device, a PDCP entity, an RLCentity, an SDAP entity, or the like in the network device, or an EHCprocessing module in an entity. The decompression end is a terminal, aPDCP entity, an RLC entity, an SDAP entity, or the like in the terminal,or an EHC processing module in an entity. In an application scenario ofsidelink (sidelink) communication between two terminals, both thecompression end and the decompression end are terminals, PDCP entities,RLC entities, SDAP entities, or the like in the terminals, or EHCprocessing modules in entities that perform sidelink communication.

During application, in an industrial control scenario, for example, inan industrial Internet of things (IIoT) scenario, most industrialcontrol data has a time sensitive (TS) characteristic, and an industrialcontrol node needs to generate data at a determined time point and needsto transmit the data to a peer node at a time interval. To supporttransmission of industrial control data, an Ethernet technology is usedfor most industrial control networks during deployment.

A conventional ether control automation technology (etherCAT) systemincludes a master node (master) and at least one slave node (slave).With the evolution of the etherCAT, a wired time sensitive network (TSN)is used to implement transmission between the master and the slave, asshown in FIG. 2. The TSN is used to ensure that a transmission latencybetween the master and the slave fluctuates within a small range, toachieve an effect similar to that of using a dedicated cable connectionbetween the master and the slave. In this way, the master and the slaveis physically flexibly connected. The master node further is referred toas a controller (controller), and the slave node further is referred toas an end device (end device).

With the evolution of wireless technologies, an expectation is that awireless network is used to implement transmission between the masterand the slave. As shown in FIG. 3, a wireless network is used toimplement transmission between a master and a slave 1, and the wirelessnetwork is used to ensure that a transmission latency between the masterand the slave 1 fluctuates within a small range, to achieve an effectsimilar to that of using a dedicated cable connection between the masterand the slave 1. The slave 1 is a slave in a slave group, andcommunicates with the master through the wireless network. Remainingslaves establish wired connections to the slave 1. The slave groupfurther is referred to as a slave chain. Therefore, a more flexiblephysical connection is implemented between the master and the slave.Alternatively, a wired connection between slaves are eliminated, andwireless transmission is used to entirely replace wired transmission, toimplement fully flexible deployment. As shown in FIG. 4, a mastercommunicates with each slave through a wireless network.

An implementation is that shown in FIG. 5. A terminal 510 accesses awireless network through a wireless interface (for example, an airinterface), to communicate with another device, such as a master,through the wireless network. The wireless network includes a radioaccess network (RAN) 520 and a core network (CN) 530. The RAN 520 isconfigured to connect the terminal 510 to the wireless network, and theCN 530 is configured to: manage the terminal and provide a gateway forcommunicating with another device. The terminal is a device having awireless communication function. The terminal is connected to a slave inthe foregoing control system through an adapter, to receive, through thewireless network, data sent by the master to the slave and send the datato the slave, or send, to the master through the wireless network, datasent by the slave to the master. The terminal and the slave isintegrated on a physical entity, for example, the slave 1 in FIG. 3 or aslave in FIG. 4 is integrated with an element (for example, a chip)having a wireless communication function. In this case, the slave isintegrated with the wireless communication function and aninstruction-based operation function of the terminal in industrialcontrol.

In the foregoing control network, a wireless network is used to replacean interface between a master and a slave, and a wired interface isstill used between slaves. In another control network, a wirelessnetwork is further used to replace an interface between a master and aslave, and each slave communicates with the master through the wirelessnetwork. In the structure shown in FIG. 4, each slave is connected to aterminal through an adapter, or each slave is integrated with an element(for example, a chip) having a wireless communication function, toaccess the wireless network through a wireless interface. In stillanother control network, the foregoing two connection manners arecombined. Some slaves communicate with a master through a wirelessnetwork, and the other slaves establish wired connections to the slavesthat are wirelessly connected to the master. For example, slaves aregrouped, and each group has one slave, for example, a slave 1. The slave1 communicates with the master through the wireless network. A remainingslave establishes a wired connection to the slave 1. The slave groupfurther is referred to as a slave chain. The slave 1 is an ingress andan egress of the slave group connected to the wireless network, that is,a slave connected to a terminal apparatus. For another example, slavesare grouped, and each group has two slaves, for example, a slave 1 and aslave n. The slave 1 and the slave n communicate with a master through awireless network, and a remaining slave establishes a wired connectionto the slave 1 and the slave n. The slave group further is referred toas a slave chain. The slave 1 and the slave n are respectively aningress and an egress of the slave group connected to the wirelessnetwork, that is, slaves connected to a terminal apparatus.

In the embodiments of this application, the terminal is further referredto as a terminal apparatus or user equipment (UE), is an apparatushaving a wireless communication function, and is connected to a slave.In the following embodiments, the terminal is referred to as a terminalapparatus. The terminal apparatus is independent of the slave, or isintegrated with the slave. When the terminal apparatus is integratedwith the slave, the terminal apparatus is an apparatus integrated with aslave physical entity and a wireless communication function, forexample, a chip or a system-on-a-chip. The terminal apparatus includes awireless terminal in industrial control (industrial control), or is aterminal having a similar use in another control system, for example, awireless terminal in self driving (self driving), a wireless terminal inremote medical surgery (remote medical surgery), a wireless terminal insmart grid (smart grid), a wireless terminal in transportation safety(transportation safety), a wireless terminal in a smart city (smartcity), or a wireless terminal in a smart home (smart home).

The network device is a device in a wireless network, for example, aradio access network (RAN) node or a base station that connects aterminal apparatus to the wireless network. Currently, examples of someRAN nodes or base stations are a gNB, a transmission reception point(TRP), an evolved NodeB (eNB), a radio network controller (RNC), a NodeB(NB), a base station controller (BSC), a base transceiver station (BTS),a home base station (for example, a home evolved NodeB or a home NodeB,HNB) a baseband unit (BBU), a relay station, a wireless fidelity (Wi-Fi)access point (AP), a radio controller in a cloud radio access network(CRAN) scenario, a road site unit (RSU) in vehicle to everything (V2X),or an access point in an integrated access backhaul (IAB) system. A RANdevice further is integrated with a function of a TSN network node. Forexample, if a function of a console is integrated, the network devicealternatively is the console. In a network structure, the network deviceincludes a centralized unit (CU) node, a distributed unit (DU) node, ora RAN device including a CU node and a DU node.

In a network architecture, a RAN includes a baseband apparatus and aradio frequency apparatus. The baseband apparatus is implemented by onenode, or is implemented by a plurality of nodes. The radio frequencyapparatus is independently implemented remotely from the basebandapparatus, or is integrated into the baseband apparatus, or a part ofthe radio frequency apparatus is implemented remotely from the basebandapparatus and the other part is integrated into the baseband apparatus.For example, a RAN includes a baseband apparatus and a radio frequencyapparatus. The radio frequency apparatus is remotely disposed relativeto the baseband apparatus. For example, a remote radio unit (RRU) isremotely disposed relative to a BBU.

Communication between the RAN and the terminal follows a protocol layerstructure. For example, a control plane protocol layer structureincludes functions of protocol layers such as a radio resource control(RRC) layer, a packet data convergence protocol (PDCP) layer, a radiolink control (RLC) layer, a media access control (MAC) layer, and aphysical layer. A user plane protocol layer structure includes functionsof protocol layers such as a PDCP layer, an RLC layer, a MAC layer, anda physical layer. In an implementation, a service data adaptationprotocol (SDAP) layer is further included above the PDCP layer. Thefunctions of these protocol layers are implemented by one node, or isimplemented by a plurality of nodes. For example, in an evolvedstructure, a RAN includes a centralized unit (CU) and a distributed unit(DU). A plurality of DUs are centrally controlled by one CU. The CU andthe DU is obtained through division based on a protocol layer of awireless network. For example, functions of the PDCP layer and aprotocol layer above the PDCP layer are set on the CU, and functions ofprotocol layers below the PDCP layer, such as the RLC layer and the MAClayer, are set on the DU. Division based on the protocol layer is merelyan example, and division alternatively is performed based on anotherprotocol layer. For example, division is performed based on the RLClayer. Functions of the RLC layer and a protocol layer above the RLClayer are set on the CU, and a function of a protocol layer below theRLC layer is set on the DU. Alternatively, division is performed at aprotocol layer. For example, some functions of the RLC layer and afunction of a protocol layer above the RLC layer are set on the CU, anda remaining function of the RLC layer and a function of a protocol layerbelow the RLC layer are set on the DU. In addition, divisionalternatively is performed in another manner. For example, division isperformed based on a latency. A function whose processing time needs tomeet a latency parameter is set on the DU, and a function whoseprocessing time does not need to meet the latency parameter is set onthe CU.

Optionally, the radio frequency apparatus is not placed in the DU but isplaced remotely from the DU, or is integrated into the DU, or a part ofthe radio frequency apparatuses is placed remotely from the DU and theother part is integrated into the DU. This is not limited herein.

Optionally, a control plane (CP) and a user plane (UP) of the CU isfurther separated, and implemented by different entities, which arerespectively a control plane CU entity (CU-CP entity) and a user planeCU entity (CU-UP entity).

In the foregoing network architecture, signaling generated by the CU issent to a terminal by using the DU, or signaling generated by a terminalis sent to the CU by using the DU. The DU transparently transmits thesignaling to the terminal or the CU by directly encapsulating thesignaling at a protocol layer without parsing the signaling. In thefollowing embodiments, if transmission of such signaling between the DUand the terminal is included, that the DU sends or receives thesignaling includes this scenario. For example, signaling at an RRC layeror a PDCP layer is finally processed as signaling at a PHY layer andsent to the terminal, or is converted from received signaling at a PHYlayer. In this architecture, further is a consideration is the signalingat the RRC layer or the PDCP layer is sent by the DU, or sent by the DUand a radio frequency apparatus.

When the foregoing CU-DU structure is used, a network device is a CUnode, a DU node, or a RAN device including a CU node and a DU node.

Learned from the foregoing descriptions is that replacing a wirednetwork with a wireless network is used as a last hop of an industrialcontrol network, this reduces costs, facilitate maintenance, and supportflexible deployment and mobility of a slave node compared with the wirednetwork. As shown in FIG. 6, a master node transmits an Ethernet frameto a slave node through a wireless network, the slave node receives theEthernet frame through the wireless network and sends an Ethernet frameto the master node through the wireless network. Therefore, the Ethernetframe needs to be transmitted in the wireless network. The Ethernetframe includes a header and a payload, and transmission of the Ethernetframe in the wireless network uses high resource overheads. In theembodiments of this application, overheads of transmitting the Ethernetframe in the wireless network are expected to be reduced, to improveresource utilization.

In the embodiments of this application, information transmitted in thewireless network is reduced through Ethernet header compression, therebyreducing resource overheads and improving resource utilization.

The following further describes a compression and decompression methodin the embodiments of this application with reference to theaccompanying drawings. Apparatuses in the following embodiments of thisapplication is located in different devices based on functionsimplemented by the apparatuses.

FIG. 7 is a schematic flowchart of an Ethernet header compression anddecompression method according to an embodiment of this application.During actual application, a compression process of a compression endand a decompression process of a decompression end is independentlyimplemented. In an example, after completing the compression process,the compression end sends a compressed Ethernet frame to thedecompression end at any time thereafter, and the decompression endreceives the compressed Ethernet frame at any time and decompress thecompressed Ethernet frame. This is not limited in this embodiment ofthis application. As shown in FIG. 7, the method provided in thisembodiment of this application includes the following steps.

Step S101: The compression end receives an Ethernet frame, where anEthernet header of the Ethernet frame includes a first to-be-compressedfield.

In this embodiment of this application, the compression end receives anEthernet frame from a master node, or receive an Ethernet frame from aslave node. The Ethernet frame includes an Ethernet header and apayload, and includes a plurality of fields. For example, FIG. 8 showsan 802.1Q Ethernet MAC frame format set in the IEEE 802.3. In theEthernet frame format, the Ethernet frame includes the following fields:a 7-byte preamble (preamble), a 1-byte start of frame delimiter (SFD), a6-byte destination media access control (MAC) address, a 6-byte sourceMAC address, a 2-byte length/type (for example, 802.1QTagType), 2-bytetag control information (TAG control information or tagging controlinformation), a 2-byte MAC client length/type, a variable length load orpayload, and a 4-byte frame check sequence (FCS). The payload includesdata (for example, MAC client data), and optionally, the payload furtherincludes a padding (padding) field. Fields before the payload are theEthernet header, and the subsequent FCS is used for check of theEthernet frame. The foregoing Ethernet format is merely an example, andis not intended to limit this application. In different Ethernet framestructures, formats are different. For example, the Ethernet headerincludes a destination MAC address, a source MAC address, and alength/type field. Other fields are partially or all included in anEthernet frame. In addition, sizes of the foregoing fields are merely anexample, and are not used to limit this application. The preamble isused to identify and detect that an Ethernet frame is transmitted on anEthernet transmission link on a receiving side of the Ethernet frame.The SFD is used to determine a start position of subsequent Ethernetframe content on the receiving side of the Ethernet frame. Thedestination MAC address is a MAC address on the receiving side. Thesource MAC address is a MAC address of a sender. The length/type is usedto identify a tag protocol. The tag control information is used toindicate tag-related information. The MAC client length/type is used toindicate a valid data length of the Ethernet frame or an Ethernet typeof a MAC client protocol.

For example, in the Ethernet frame format shown in FIG. 8, in theEthernet header of the compressed Ethernet frame, the firstto-be-compressed field includes a destination MAC address, a source MACaddress, a length/type field, TAG control information, or a MAC clientlength/type. In addition, any one, two or more fields, or all of thesefields are compressed. The first to-be-compressed field further includestwo or more of the foregoing fields. For example, the firstto-be-compressed field includes the destination MAC address and thesource MAC address. That is, the MAC addresses in the Ethernet headerare compressed. This compression manner is applicable to Ethernet headercompression in a scenario in which another field changes greatly but theMAC address field is static. Alternatively, the first to-be-compressedfield includes the destination MAC address, the TAG control information,and the MAC client length/type. Fields included in the firstto-be-compressed field in Ethernet headers in different formats aredifferent. Table 1 shows fields included in a frame format of anEthernet II type. The first to-be-compressed field includes any one ortwo, or all of the following fields: the destination MAC address field,the source MAC address field, and the type field.

TABLE 1 6 bytes 6 bytes 2 bytes 46 to 1500 bytes 4 bytes DestinationSource MAC Type Data FCS MAC address address

Step S102: The compression end determines first compression informationof the Ethernet header of the Ethernet frame based on a firstcorrespondence and the first to-be-compressed field, where the firstcorrespondence includes a correspondence between the first compressioninformation and a value of the first to-be-compressed field.

In this embodiment of this application, the compression end stores acorrespondence between compression information and a value of ato-be-compressed field, where the first correspondence is thecorrespondence between the first compression information and the valueof the first to-be-compressed field. A correspondence stored by thecompression end includes the first correspondence, that is, the firstcorrespondence is prestored at the compression end. Alternatively, acorrespondence stored by the compression end is excluded the firstcorrespondence. In this case, the first correspondence further isgenerated by the compression end in real time or based on a parameter ina data stream transmission process. A manner of obtaining the firstcorrespondence is not limited in this embodiment of this application. Amethod used by the compression end to generate the first correspondenceis determined based on an actual application scenario. The method forgenerating the first correspondence is further described in subsequentembodiments. Details are not described herein in this embodiment of thisapplication.

The compression end determines the first compression informationincluded in the first correspondence as the first compressioninformation of the Ethernet header of the Ethernet frame. Each ofcorrespondences are associated with an identifier of the correspondence,and the compression information includes the identifier of thecorrespondence (or referred to as an identifier of the compressioninformation). In this case, the first compression information includesan identifier of the first correspondence or an identifier of the firstcompression information. In the following embodiments, an example inwhich the information is a context identifier (CID) is used.

Optionally, the compression information further includes a profileidentifier (profile ID), so that the first compression informationfurther includes a first profile ID. The profile ID is used to identifya profile (profile). The profile is used to specify a compressionmechanism, for example, the profile is used to indicate a compressiblefield and/or a compression manner. Different profiles are distinguishedby using profile IDs. Alternatively, the profile ID is used to indicatea communication protocol of the Ethernet header and/or ato-be-compressed field of the Ethernet header. For example, profile ID=1indicates that the destination MAC address+source MAC address fields inthe IEEE 802.3 Ethernet frame format are compressed; profile ID=2indicates that the destination MAC address+source MAC address+TAGcontrol information fields in the IEEE 802.3 Ethernet frame format arecompressed; profile ID=3 indicates that the destination MACaddress+source MAC address+length/type fields in the Ethernet 2 Ethernetframe format are compressed, and the like. The foregoing provides anexample of a to-be-compressed field directed by the profile in theEthernet protocol. Optionally, a transport layer protocol is introduced.In this way, the compression end and the decompression end is configuredto use different profile IDs to distinguish between the transmissioncontrol protocol/internet protocol (TCP/IP) and the User DatagramProtocol/Internet Protocol (UDP/IP).

Optionally, the compression information is excluded a profile ID. Forexample, when the compression end and the decompression end compress theEthernet header based on a profile, the compression end and thedecompression end determines the profile as a default profile, andperform compression or decompression based on the profile whenperforming compression or decompression. In this case, the compressioninformation is excluded the profile ID. In this case, the compressioninformation alternatively includes the profile ID, to facilitatesubsequent extension. Optionally, the compression end further stores anindication variable of each correspondence, and the indication variableis used to indicate whether compression information of thecorrespondence is used for compression.

In an implementation, the compression end stores context information,where the context information includes at least one context entry(entry). The context information is as follows:

Entry 1: CID 1, profile 1, a compressed-field value A1, and anavailability indication;

Entry 2: CID 2, profile 2, compressed-field value A2, and anavailability indication;

. . .

Entry N: CID 3, profile N, compressed-field value AN, and anavailability indication.

N is a positive integer, that is, the context information includes theat least one context entry. Each context entry includes a CID and acompressed-field value, that is, each correspondence described above. Inaddition, each context entry further includes an indication variable,referred to as an availability indication herein, used to indicatewhether compression information in a context entry in which theindication variable (or compression information) is located is used forcompression. The first correspondence is included in one context entry(for example, a first entry). If the compression end does not store thefirst entry, the compression end generates the first entry into thestored context information. Each of correspondences are associated withan identifier of the correspondence, and the identifier of thecorrespondence is referred to as a context identifier (CID), that is,each context entry is associated with one CID. In this case, thecompression information includes the CID, the first compressioninformation includes a first CID, and the first CID further is used asan identifier of the first correspondence. Optionally, each contextentry includes a profile ID. In this case, the compression informationincludes the profile ID, and the first compression information includesa first profile ID. If the profile ID is not included, a default profileis used for compression. In addition, profile IDs included in differentcontext entries are the same. For example, both the entry 1 and theentry 2 is configured to use the profile 1.

Step S103: The compression end compresses the Ethernet header of theEthernet frame based on the first compression information.

In this embodiment of this application, the compression end compressesthe Ethernet header of the Ethernet frame based on the first compressioninformation. If the first compression information includes the profileID, a profile is determined based on the profile ID, and the firstto-be-compressed field is found based on a compressed field directed bythe profile. If the first correspondence does not include the profileID, the first to-be-compressed field is found based on a compressedfield directed by the default profile. The first to-be-compressed fieldis one or more fields in the Ethernet header, and a field or fields thatis/are included is determined based on the profile. When the firstto-be-decompressed field is one field in the Ethernet header, a value ofthe first to-be-compressed field in the first correspondence is thefield. When the first to-be-decompressed field is a plurality of fieldsin the Ethernet frame header, a value of the first to-be-compressedfield in the first correspondence is a combination of values of theplurality of fields. For example, the compression end deletes the firstto-be-compressed field in the Ethernet header, and add the correspondingfirst CID to a data packet. During actual application, the Ethernetheader of the Ethernet frame alternatively is compressed based on thefirst compression information in another manner based on an actualapplication scenario. This is not specifically limited in thisembodiment of this application.

Correspondingly, after compressing the Ethernet header of the Ethernetframe, the compression end further sends the compressed Ethernet frameto the decompression end. The decompression end decompresses thecompressed Ethernet frame based on the correspondence between the firstcompression information and the value of the first to-be-compressedfield. For details, refer to the descriptions in steps S104 to S107.

Step S104: The compression end sends the compressed Ethernet frame tothe decompression end.

In this embodiment of this application, the compression end selects anappropriate manner based on an actual application scenario, to send thecompressed Ethernet frame to the decompression end. That the compressionend sends the compressed Ethernet frame to the decompression end is notspecifically limited in this embodiment of this application.

In this embodiment of this application, the compressed Ethernet frameincludes the first compression information. Specifically, the firstcompression information includes the first CID, so that thedecompression end further decompresses the compressed Ethernet framebased on the first CID.

In an optional implementation, the compression end sends the compressedEthernet frame to the decompression end by using a packet dataconvergence protocol control protocol data unit (PDCP data PDU).

In this embodiment of this application, an EHC header is configured in aformat of the PDCP data PDU. For example, FIG. 9 shows a format of aPDCP data PDU configured with an EHC header according to an embodimentof this application. The format of the PDCP data PDU includes a PDCPheader, a service data adaptation protocol (SDAP) header, the EHCheader, an Ethernet data payload (Ethernet data payload), and a messageauthentication code for integrity (MAC-I), where the PDCP headerincludes a PDCP serial number (SN), and PDCP SNs are set in differentrows. In the figure, “if configured” indicates that this field isoptional, that is, this field is configured, or is unable to beconfigured.

FIG. 9 shows one manner of locations of the PDCP header, the SDAPheader, the EHC header, the Ethernet data payload, and the MAC-I. Duringactual application, locations, specific byte lengths, and includedcontent of the PDCP header, the SDAP header, the EHC header, theEthernet data payload, and the MAC-I is adaptively set based on anactual application scenario. This is not specifically limited in thisembodiment of this application. For example, a length of the PDCP SN is12 bits or 18 bits. For example, the SDAP header is located between theEHC header and the Ethernet data payload, the SDAP header is locatedbetween the Ethernet data payload and the MAC-I, or the SDAP header islocated after the MAC-I.

In this embodiment of this application, the EHC header includes anindication field F, a CID, and the Ethernet header. The indication fieldF is used to indicate whether the EHC header includes a complete orcompressed Ethernet header, or is used to indicate whether the Ethernetheader is compressed. For example, FIG. 10 shows a format of an EHCheader according to an embodiment of this application. A length of theindication field F is 1 to 3 bits. For example, a length of F is 1 bit,and a value is 1 or 0. The decompression end determines, based on thevalue of the field F, whether the data packet carries the compressedEthernet frame. In this step, the compression end sends the compressedEthernet frame to the decompression end. Therefore, the value of thefield F indicates that the EHC header includes the compressed Ethernetheader or indicates whether the Ethernet header is compressed. A lengthvalue of a context identifier (context ID/CID) field is 2 to 16 bits.For example, a length of the context ID field is 5 bits, 6 bits, 7 bits,8 bits, or 16 bits. This field indicates an identifier of compressioninformation used for header compression of the Ethernet frame. AnEthernet header field is a part obtained after the firstto-be-compressed field is removed from an original Ethernet header. Asequence of the foregoing fields are that the field F is located beforethe CID field, and the CID field is located before the Ethernet headerfield; or the CID field is located before the field F, and the field Fis located before the Ethernet header field. That is, the sequence ofthese fields is not limited in this embodiment of this application.

In an optional implementation of this embodiment of this application, toensure byte alignment of the EHC, the EHC further includes one or moreReserved® bits, for example, at least one of a location before the fieldF, a location between the field F and the CID field, and a locationbetween the CID field and the Ethernet header has at least one reservedbit/R bit. For example, as shown in FIG. 11, the length of the field Fis 1 bit, the length of the CID field is 5 bits, and two reserved bitsare located after the CID field.

In an optional implementation of this embodiment of this application,the EHC header further includes a profile ID, and a location of theprofile ID is located between the CID and the Ethernet header. This isnot specifically limited in this embodiment of this application. In thiscase, the foregoing indication field F is further used to indicatewhether a first EHC header includes the profile ID. Alternatively, a newindication field is added to the EHC header, to indicate whether a firstEHC header includes the profile ID.

Because the correspondence stored by the decompression end includes theprofile ID or the default profile is used, in an optional implementationof this embodiment of this application, a further set is that the EHCheader of the compressed Ethernet frame does not include the profile ID.Therefore, space occupied by the compressed Ethernet frame is furtherreduced, and resource occupation is further reduced.

Step S105: The decompression end receives the Ethernet frame, where theEthernet frame includes an identifier of a first correspondence, thatis, a first CID.

Step S106: The decompression end determines, based on the first CID, thefirst correspondence including the first CID, where the firstcorrespondence includes a correspondence between first compressioninformation and a value of a first to-be-decompressed field, and thefirst compression information includes the first CID.

In this embodiment of this application, specific content of the firstcorrespondence is the same as specific content of the firstcorrespondence at the compression end. To correspond to a decompressionaction of the decompression end, a value of a field corresponding to thefirst compression information in the first correspondence is referred toas the value of the first to-be-decompressed field. The firstcompression information is the same as that in the foregoingdescriptions of the compression end, and further is referred to as firstdecompression information at the decompression end. Content included inthe first compression information is the same as that in the foregoingdescriptions of the compression end.

Same as the compression end, the decompression end stores acorrespondence between compression information and a value of ato-be-decompressed field, where the first correspondence is thecorrespondence between the first compression information and the valueof the first to-be-decompressed field. A correspondence stored by thedecompression end includes the first correspondence, that is, the firstcorrespondence is prestored at the decompression end. Alternatively, acorrespondence stored by the decompression end is excluded the firstcorrespondence. In this case, the first correspondence further isreceived by the decompression end in real time or from the compressionend during data stream transmission. A manner of obtaining the firstcorrespondence by the decompression end is not specifically limited inthis embodiment of this application. A method used by the decompressionend to obtain the first correspondence is determined based on an actualapplication scenario. The method used by the decompression end to obtainthe first correspondence is further described in subsequent Embodiments.Details are not described herein in this embodiment of this application.

The decompression end determines a value of a to-be-decompressed fieldincluded in the first correspondence as the value of the firstto-be-decompressed field of the Ethernet header of the Ethernet frame.Each of correspondences are associated with an identifier of thecorrespondence, and the compression information includes the identifierof the correspondence. In this case, the first compression informationincludes the identifier of the first correspondence.

Optionally, the compression information further includes a profileidentifier, so that the first compression information further includes afirst profile ID. The profile ID is used to identify a profile. Theprofile is used to specify a compression mechanism, for example, theprofile is used to indicate a compressible field and/or a compressionmanner. Different profiles are distinguished by using profile IDs.Alternatively, the profile ID is used to indicate a communicationprotocol of the Ethernet header and/or a to-be-compressed field of theEthernet header. In addition, same as the compression side, thecompression information is excluded a profile ID. For detaileddescriptions, refer to the descriptions of the compression side. Detailsare not described herein again. Optionally, same as the compression end,the decompression end further stores an indication variable of eachcorrespondence, and the indication variable is used to indicate whethercompression information of the correspondence is used for compression.

Same as the compression end, the decompression end stores contextinformation, where the context information includes at least one contextentry (entry). The descriptions of the context information are the sameas those in the foregoing embodiment, and details are not describedherein again.

If the decompression end has the same understanding of a compressionmechanism as the compression end, “compression” in the descriptions ofthe decompression end is replaced with “decompression”.

Step S107: The decompression end decompresses the Ethernet header of theEthernet frame based on the first compression information and the valueof the first to-be-decompressed field.

In this embodiment of this application, the decompression enddecompresses the Ethernet header by using a process opposite to that ofthe compression end. The decompression end determines, based on thefirst CID, the first correspondence of the first CID, to find the valueof the first to-be-decompressed field. If the first correspondence orthe first compression information includes the profile ID, a profile isdetermined based on the profile ID, and the first to-be-decompressedfield is found based on a compressed field directed by the profile. Ifthe first correspondence does not include the profile ID, the firstto-be-decompressed field is found based on a compressed field directedby the default profile. The first to-be-decompressed field is one ormore fields in the Ethernet header, and a specific field or specificfields that is/are specifically included is determined based on theprofile. When the first to-be-decompressed field is one field in theEthernet header, the value of the first to-be-decompressed field in thefirst correspondence is filled into the field in the Ethernet header, todecompress the Ethernet header in the to-be-decompressed Ethernet frame.When the first to-be-decompressed field is a plurality of fields in theEthernet header, the value of the first to-be-decompressed field in thefirst correspondence is split into values of the plurality of fieldsbased on sizes of the plurality of fields, and the values arerespectively filled into the plurality of fields, to decompress theEthernet header of the to-be-decompressed Ethernet frame. For example,the first to-be-decompressed field includes a plurality of fields in theEthernet header, for example, includes a destination MAC address, asource MAC address, and a MAC client length/type. After determining aspecific value of the first to-be-decompressed field based on the firstCID, when recovering an original Ethernet header, the decompression endfills a value of a corresponding field into a corresponding Ethernetheader field. For example, the decompression end fills a value of thedestination MAC address into a destination MAC address field location,fills a value of the source MAC address into a source MAC address fieldlocation, and fills a value of the MAC client length/type into a MACclient length/type field location. During actual application,decompression alternatively is performed based on an actual applicationscenario by using a decompression manner corresponding to a compressionmanner of the compression end. This is not specifically limited in thisembodiment of this application.

In conclusion, in this embodiment of this application, after receivingthe Ethernet frame including the first to-be-compressed field, thecompression end compresses the Ethernet header of the Ethernet framebased on the first correspondence including the first compressioninformation and the value of the first to-be-compressed field and thefirst compression information. Correspondingly, the decompression enddecompresses the Ethernet header of the compressed Ethernet frame basedon the first correspondence when receiving the compressed Ethernetframe. In this embodiment of this application, because the Ethernetheader of the Ethernet frame is compressed, communication resources issaved.

The first correspondence in this embodiment of this application isgenerated by the compression end, and is synchronized with thedecompression end. After the decompression end completes synchronizationof the first correspondence, the decompression end and the compressionend performs corresponding compression and decompression operationsbased on the first correspondence. FIG. 12 is a schematic flowchart of amethod for synchronizing a first correspondence between a compressionend and a decompression end according to an embodiment of thisapplication. As shown in FIG. 12, the method provided in this embodimentof this application includes the following steps.

Step S201: A compression end generates a first correspondence.

In this embodiment of this application, after receiving an Ethernetframe, the compression end generates the first correspondence based on ato-be-compressed field included in the received Ethernet frame. In thisembodiment of this application, the Ethernet frame received by thecompression end is the same as or different from the Ethernet frame inthe embodiment corresponding to FIG. 7, and a value of theto-be-compressed field in the Ethernet header of the Ethernet frame inthis embodiment of this application is same as the value of the firstto-be-compressed field in the embodiment corresponding to FIG. 7.

The to-be-compressed field is the same as that in the descriptions inthe foregoing embodiment, and is one or more fields in the Ethernetheader. For example, the compression end alternatively generates thefirst correspondence based on one or more of the following fields: adestination MAC address, a source MAC address, a length/type field, TAGcontrol information, a MAC client length/type, and the like. A specificmanner of generating the first correspondence is not limited in thisembodiment of this application.

During specific application, the compression end stores a pre-generatedcorrespondence, where the correspondence includes a correspondencebetween compression information and a value of a to-be-compressed field.After the compression end receives the Ethernet frame including thefirst to-be-compressed field, when the correspondence stored by thecompression end does not include the value of the first to-be-compressedfield of the Ethernet frame, the compression end generates the firstcorrespondence, where the first correspondence includes a CID and thevalue of the first to-be-compressed field. With reference to theforegoing embodiment, the correspondence is stored in a contextinformation manner, and details are not described herein again. When thefirst to-be-compressed field is one field, a value of the firstto-be-compressed field is a value of the field. When the firstto-be-compressed field is a plurality of fields, a value of the firstto-be-compressed field is a combination of values of the plurality offields, and a length of a value of each field is directed by a profile.A combination manner of the values of the plurality of fields aredetermined based on the profile. For example, if a location relationshipof the fields is in the profile, combination is performed based on alocation sequence of the fields. This is not limited in this embodimentof this application.

For example, the compression end currently stores a correspondenceincluding a CID 1 and a CID 2, a value of a to-be-compressed field ofthe CID 1 is A, and a value of a to-be-compressed field of the CID 2 isB. When a new Ethernet frame arrives at the compression end, a value ofa to-be-compressed field of an Ethernet header is C, and a matching itemof C is unable to be found in the currently stored correspondence, thecompression end allocates a new CID, for example, a CID 3, to the firstto-be-compressed field.

In an optional implementation, same as the foregoing embodiment, thecompression information further includes a profile ID. When thecompression end and the decompression end perform EHC based on aprofile, the compression end and the decompression end determines theprofile as a default profile, and perform compression or decompressionbased on the profile when performing compression or decompression. Inthis case, the compression information is excluded the profile ID.

Step S202: The compression end sends the first correspondence to thedecompression end.

In this embodiment of this application, the compression end sends thefirst correspondence to the decompression end in an appropriate mannerbased on an actual application scenario. This is not limited in thisembodiment of this application.

In an optional implementation, the compression end sends an uncompresseddata packet to the decompression end, where the uncompressed data packetincludes the first correspondence.

In this embodiment of this application, the compression end isconfigured to use the first correspondence and the received Ethernetframe as an uncompressed data packet for sending to the decompressionend. In an optional implementation, the compression end sends theuncompressed data packet to the decompression end by using a PDCP dataPDU. In another optional implementation, the compression end sends thefirst correspondence to the decompression end by using a packet dataconvergence protocol control protocol data unit PDCP control PDU, andsend an Ethernet frame data packet to the decompression end by using aPDCP data PDU.

In an optional implementation of this embodiment of this application,the compression end sends the first correspondence to the decompressionend for a plurality of times, and a quantity times threshold is furthercorrespondingly set for the first correspondence. For example, thecompression end maintains a sending quantity times variable for thefirst correspondence. An initial value of the variable is 0. Thecompression end sends the first correspondence once, and then thesending quantity times variable is accumulated by 1. When a quantity oftimes of sending the first correspondence to the decompression end bythe compression end reaches the quantity times threshold, aconsideration is the decompression end has successfully received thefirst correspondence. A consideration is the first correspondence hasbeen synchronized between the compression end and the decompression end,and step S204 is unable to be performed. The quantity times threshold ispredetermined in a protocol, or is a number that is greater than orequal to 1 and is configured by a network device. In a sidelinkcommunication scenario, the quantity times threshold is determined bythe compression end, or configured by another terminal device for thecompression end. This is not limited in this embodiment of thisapplication.

Step S203: The decompression end receives the first correspondence fromthe compression end.

In this embodiment of this application, the decompression end receivesthe first correspondence from the compression end in an appropriatemanner based on an actual application scenario. A receiving manner isnot limited in this embodiment of this application.

In an optional implementation, after the decompression end receives thefirst correspondence, when the correspondence stored by thedecompression end does not include the first compression information,the decompression end stores the first correspondence.

In another optional implementation, after the decompression end receivesthe first correspondence, when the correspondence stored by thedecompression end includes the first compression information, and avalue of a to-be-decompressed field corresponding to the firstcompression information is different from a value of the firstto-be-decompressed field, the decompression end modifies the value ofthe to-be-decompressed field corresponding to the first compressioninformation to the first to-be-decompressed field.

With reference to the foregoing embodiment, the decompression endfurther stores the correspondence in a context information manner, anddetails are not described herein again.

Step S204: The decompression end sends feedback information to thecompression end, where the feedback information is used to indicate areceiving status of the first correspondence.

In this embodiment of this application, the decompression end furthersends the feedback information to the compression end, where thefeedback information is used to indicate the receiving status of thefirst correspondence. For example, the receiving status includes areceiving success or a receiving failure. When the receiving status isthe receiving success, the compression end and the decompression endperforms corresponding compression and decompression processing based onthe first correspondence. When the receiving status is the receivingfailure, the compression end and the decompression end is unable toperform corresponding compression and decompression processing based onthe first correspondence, and the compression end further resends thefirst correspondence to the compression end, delete the firstcorrespondence, or the like. This is not limited in this embodiment ofthis application.

In an optional implementation, the feedback information includes theCID, or confirms a PDCP SN of a data packet that carries the firstcorrespondence. The compression end determines, based on the CID or thePDCP SN, a correspondence that is unsuccessfully received.

In an optional implementation, the feedback information further includesat least one of the following: a profile ID, a first indication field,and a second indication field, where the first indication field is usedto indicate that the first correspondence is a newly addedcorrespondence or a modified correspondence at the decompression end,and the second indication field is used to indicate whether the feedbackinformation is a positive feedback or a negative feedback. When thefeedback information includes the CID and the at least one piece of theforegoing information, a length of bits occupied by the CID and eachpiece of information, and a location in the feedback information is notlimited in this embodiment of this application.

For example, FIG. 13 shows a schematic diagram of a format of feedbackinformation. In the schematic diagram of the format, the feedbackinformation is sent by using a PDCP control PDU, and includes a CIDfield, a first indication field (AddOrModify), and a second indicationfield (AckType). The first byte is a header of the PDCP control PDU,where a value of a D/C field indicates that the PDCP PDU is a controlPDU, and a value of a PDU type (type) indicates that the control PDU isa control PDU used to transmit the feedback information. For example,the value of the PDU type is a value other than ‘000’ and ‘001’, forexample, ‘010’ or ‘011’. A length value of the context identifier(context ID/CID) field is 2 to 16 bits. For example, a length of thecontext ID field is 5 bits, 6 bits, 7 bits, 8 bits, or 16 bits. A lengthvalue of the AckType field is 1 to 4 bits. For example, a length of theAckType field is 1 bit and a value is 1 or 0. AckType=1 indicates asuccessful feedback operation, and AckType=0 indicates an unsuccessfulfeedback operation; or AckType=0 indicates a successful feedbackoperation, and AckType=1 indicates an unsuccessful feedback operation. Alength value of the AddOrModify field is 1 to 4 bits. For example, alength of the AddOrModify field is 1 bit and a value is 1 or 0.AddOrModify=1 indicates that a feedback is newly added contextinformation, and AckType=0 indicates that a feedback is modified contextinformation; or AddOrModify=0 indicates that a feedback is newly addedcontext information, and AckType=1 indicates that a feedback is modifiedcontext information. A sequence of the foregoing fields are the CIDfield, the AckType field, and the AddOrModify field; the AckType field,the CID field, and the AddOrModify field; or the AckType field, theAddOrModify field, and the CID field. This is not limited in thisembodiment of this application.

In an optional implementation of this embodiment of this application, toensure byte alignment of the PDCP control PDU used for the feedback, thecontrol PDU further has one or more reserved bits. For example, on thepremise of the field sequence shown in FIG. 13, at least one of alocation between the header of the PDCP control PDU and the CID, alocation between the CID field and the AckType field, and a locationbetween the AckType field and the AddOrModify field has at least onereserved bit.

As described in the foregoing embodiment, in an optional implementationof this embodiment of this application, the compression end furtherstores an indication variable of each correspondence, and the indicationvariable is used to indicate whether compression information of thecorresponding correspondence is used for compression.

In this embodiment of this application, considering that thedecompression end is unable to correctly receive the firstcorrespondence, even if the first correspondence is generated by thecompression end, the first correspondence is unable to be used forcompression. Therefore, the compression end further stores an indicationvariable of the correspondence, and the indication variable is used toindicate whether compression information of the correspondence is usedfor compression. For example, a value of the indication variableincludes 0 and 1. When the indication variable is 1, an indication thefirst correspondence is used for compression; when the indicationvariable is 0, an indication the first correspondence is unable to beused for compression. Alternatively, when the indication variable is 0,an indication the first correspondence is used for compression; when theindication variable is 1, an indication the first correspondence isunable to be used for compression.

Optionally, when the correspondence stored by the compression endincludes the first correspondence corresponding to the firstto-be-compressed field of the Ethernet frame, and the indicationvariable of the first correspondence indicates that the compressioninformation of the first correspondence is not used for compression, thecompression end sends the first correspondence to the decompression end.

In this embodiment of this application, for a manner in which thecompression end sends the first correspondence to the decompression end,refer to the descriptions in step S202. Details are not described hereinagain.

Optionally, the compression end sets the indication variable to a firstvalue when the compression end determines that the first correspondenceis correctly received by the decompression end, where the first value isused to indicate that the compression information is used forcompression.

In this embodiment of this application, there is a plurality of mannersin which the compression end determines that the first correspondence iscorrectly received by the decompression end. For example, thecompression end sends the first correspondence to the decompression endfor N times, where N is a value greater than or equal to 1. In thiscase, the compression end determines that the first correspondence iscorrectly received by the decompression end. Alternatively, thecompression end receives feedback information that is sent by thedecompression end and is used to indicate that the first correspondenceis correctly received. In this case, the compression end determines thatthe first correspondence is correctly received by the decompression end.A manner in which the compression end determines that the firstcorrespondence is correctly received by the decompression end is notlimited in this embodiment of this application.

In this embodiment of this application, the first value is set based onan actual application scenario, for example, is 1 or 0. This is notlimited in this embodiment of this application.

During actual application, when the compression end initially generatesthe first correspondence, the indication variable of the firstcorrespondence is set to a second value, and the second value is used toindicate that the compression information is unable to be used forcompression. The second value is set based on an actual applicationscenario, for example, is 0 or 1. This is not limited in this embodimentof this application.

In an optional implementation, this embodiment of this applicationfurther includes: sending, by the compression end, second indicationinformation to the decompression end, where the second indicationinformation is used to indicate that the first correspondence is a newlyadded correspondence or a modified correspondence at the compressionend.

In this embodiment of this application, considering that the firstcorrespondence is a newly added correspondence, or is a previouslyexisting correspondence but the corresponding indication variableindicates unavailability, the second indication information is used toindicate that the first correspondence is the newly added correspondenceor the modified correspondence at the compression end.

In conclusion, in this embodiment of this application, a correspondencefor compression and decompression is synchronized between thecompression end and the decompression end. In this case, when anEthernet data packet is subsequently transmitted between the compressionend and the decompression end, the Ethernet header is compressed anddecompressed based on the synchronized correspondence, to reduceoccupation of communication resources by the Ethernet header.

In an optional implementation of step S202 in this embodiment of thisapplication, in a manner in which the compression end sends theuncompressed data packet to the decompression end by using the PDCP dataPDU, step S202 includes: The compression end sends the firstcorrespondence to the decompression end by using the PDCP data PDU,where the PDCP data PDU includes an EHC header, the EHC header includesan indication field, the CID, and the Ethernet header, and theindication field is used to indicate whether the EHC header includes acomplete or compressed Ethernet header, or is used to indicate whetherthe Ethernet header is compressed.

For example, as shown in FIG. 14, when the compression end sends thefirst correspondence to the decompression end by using the PDCP dataPDU, an indication field F of the EHC header is used to indicate whetherthe EHC header includes a complete or compressed Ethernet header, or isused to indicate whether the Ethernet header is compressed. For example,a length of the indication field F is 1 to 3 bits. For example, thelength of F is 1 bit, and a value is 1 or 0. The decompression enddetermines, based on the value of the field F, whether the data packetcarries the complete Ethernet header. A length value of a CID field is 2to 16 bits. For example, a length of the CID field is 5 bits, 6 bits, 7bits, 8 bits, or 16 bits. This field indicates an identifiercorresponding to compression information used for header compression ofthe Ethernet frame. An Ethernet header field is an original Ethernetheader and includes a to-be-compressed field and an uncompressed field.A sequence of the foregoing fields are the field F, the CID field, andthe Ethernet header; or the CID field, the field F, and the Ethernetheader. This is not limited in this embodiment of this application.

In an optional implementation of this embodiment of this application, toensure byte alignment of the EHC, the EHC further includes one or morereserved bits. For example, on the premise of the field sequence in FIG.14, at least one of a location before the field F, a location betweenthe field F and the CID field, and a location between the CID field andthe Ethernet header has at least one reserved bit. For example, as shownin FIG. 15, the length of the F field is 1 bit, the length of the CIDfield is 6 bits, and one reserved bit is located between the CID fieldand the Ethernet header.

Optionally, when the first correspondence carries a profile ID, theindication field F is further used to indicate whether a first EHCheader includes a profile identifier profile ID. When the indicationfield F is used to indicate that the profile ID is included, the EHCheader further includes the profile ID. Alternatively, a new indicationfield is added to the EHC header, to indicate whether a first EHC headerincludes the profile ID.

For example, as shown in FIG. 16, when the compression end sends thefirst correspondence to the decompression end by using the PDCP dataPDU, an indication field F of the EHC header is used to indicate whetherthe EHC header includes a complete or compressed Ethernet header andwhether the EHC header carries a profile ID. A length of the indicationfield F is 1 to 3 bits. For example, a length of F is 1 bit, and a valueis 1 or 0. The decompression end determines, based on the value of thefield F, that the data packet carries the complete Ethernet header andcarries a profile ID field. A length value of a CID field is 2 to 16bits. For example, a length of the CID field is 5 bits, 6 bits, 7 bits,8 bits, or 16 bits. This field indicates an identifier corresponding tocompression information used for header compression of the Ethernetframe. A length value of the profile ID field is 2 to 8 bits. Forexample, a length of the profile ID field is 4 bits, 5 bits, 6 bits, or8 bits. An Ethernet header field is an original Ethernet header andincludes a to-be-compressed field and a to-be-uncompressed field. Asequence of the foregoing fields are the field F, the CID field, theprofile ID field, and the Ethernet header; or the CID field, the fieldF, the profile ID field, and the Ethernet header.

In an optional implementation of this embodiment of this application, toensure byte alignment of the EHC, the EHC further includes one or morereserved bits. For example, on the premise of the field sequence in FIG.16, at least one of a location before the field F, a location betweenthe field F and the CID field, a location between the CID field and theprofile ID field, and a location between the profile ID field and theEthernet header has at least one reserved bit. For example, as shown inFIG. 17, the length of the F field is 1 bit, the length of the CID fieldis 6 bits, the length of the profile ID is 6 bits, and three reservedbits are located between the CID field and the profile ID.

Optionally, the PDCP data PDU further includes a PDCP header, a servicedata adaptation protocol SDAP header, an Ethernet data payload, and aMAC-I. Similar to the format of the PDCP data PDU in FIG. 9, details arenot described herein again.

In another optional implementation of step S202 in this embodiment ofthis application, in a manner in which the first correspondence is sentto the decompression end by using the PDCP control PDU and the Ethernetframe is sent to the decompression end by using the PDCP data PDU, stepS202 includes: The compression end sends the first correspondence to thedecompression end by using the PDCP control PDU, where the PDCP controlPDU includes indication information, the CID, and a value of acompressible field of the Ethernet header, and the indicationinformation is used to indicate that the PDCP control PDU is used forthe first correspondence. Optionally, the PDCP control PDU is excluded avalue of a to-be-compressed field, but the PDCP data PDU is subsequentlysent to the decompression end, where the PDCP data PDU carries theEthernet header, and a value of a to-be-compressed field in the Ethernetheader is equal to the value of the to-be-compressed field.

For example, as shown in FIG. 18, in a manner in which the firstcorrespondence is sent to the decompression end by using the PDCPcontrol PDU and the Ethernet frame is sent to the decompression end byusing the PDCP data PDU, indication information is a PDU type, and thefirst byte is a header of the PDCP control PDU, where a value of a D/Cfield indicates that the PDCP PDU is a control PDU, and a value of thePDU type indicates that the control PDU is a control PDU used totransmit the first correspondence. For example, the value of the PDUtype is a value other than ‘000’ and ‘001’, for example, ‘010’ or ‘011’.A length value of a CID field is 2 to 16 bits. For example, a length ofthe CID field is 5 bits, 6 bits, 7 bits, 8 bits, or 16 bits. This fieldindicates an identifier corresponding to compression information usedfor header compression of the Ethernet frame. A value of ato-be-compressed field is a value of a first to-be-compressed field in afirst relationship corresponding to the CID field, that is, a value ofthe to-be-compressed field in the Ethernet header is included. Asequence of the foregoing fields are the CID field and the value of theto-be-compressed field; or the CID field and the value of theto-be-compressed field.

In an optional implementation of this embodiment of this application, toensure byte alignment of the PDCP control PDU, the control PDU furtherincludes one or more reserved bits. For example, on the premise of thefield sequence in FIG. 18, as shown in FIG. 19, there is at least onereserved bit R between a header of the control PDU and the CID field.

Optionally, when the first correspondence carries a profile ID, the PDCPcontrol PDU further includes the profile ID.

For example, as shown in FIG. 20, the PDCP control PDU further includesa profile ID, where a value of a D/C field indicates that the PDCP PDUis a control PDU, and a value of a PDU type indicates that the controlPDU is a control PDU used to transmit the first correspondence. Forexample, the value of the PDU type is a value other than ‘000’ and‘001’, for example, ‘010’ or ‘011’. A length value of a contextidentifier (context ID/CID) field is 2 to 16 bits. For example, a lengthof the context ID field is 5 bits, 6 bits, 7 bits, 8 bits, or 16 bits.This field indicates an identifier corresponding to compressioninformation used for header compression of the Ethernet frame. A lengthvalue of a profile identifier (profile ID) field is 2 to 8 bits. Forexample, a length of the profile ID field is 4 bits, 5 bits, 6 bits, or8 bits. A value of a to-be-compressed field is a value of a firstto-be-compressed field in a first relationship corresponding to the CIDfield, that is, a value of the to-be-compressed field is included. Asequence of the foregoing fields are the CID field, the profile IDfield, and the value of the to-be-compressed field; or the profile IDfield, the CID field, and the value of the to-be-compressed field. Thatis, the sequence of these fields is not limited in this embodiment ofthis application.

In an optional implementation of this embodiment of this application, toensure byte alignment of the PDCP control PDU, the control PDU furtherincludes one or more reserved bits. For example, on the premise of thefield sequence in FIG. 20, at least one of a location between a headerof the control PDU and the CID field, a location between the CID fieldand the profile ID field, and a location between the profile ID fieldand the value of the to-be-compressed field has at least one reservedbit. For example, as shown in FIG. 21, there is at least one reservedbit between the header of the control PDU and the CID field.Alternatively, as shown in FIG. 22, the length of the CID field is 8bits, the length of the profile ID is 7 bits, and there is one reservedbit between the profile ID and the value field of the to-be-compressedfield.

In this embodiment of this application, the compression end furthersends a PDCP data PDU to the decompression end, where the PDCP data PDUincludes an EHC header, the EHC header carries an indication field, andthe Ethernet header, and the indication field is used to indicatewhether the EHC header carries a CID.

In this embodiment of this application, a length of the indication fieldF is 1 to 3 bits. For example, a length of F is 1 bit, and a value is 1or 0. F=0 indicates that a subsequent Ethernet header is a compressedEthernet header; F=1 indicates that a subsequent Ethernet header is anoriginal Ethernet header. Alternatively, F=1 indicates that a subsequentEthernet header is a compressed Ethernet header; F=0 indicates that asubsequent Ethernet header is an original Ethernet header. In this step,the compression end sends the uncompressed Ethernet frame to thedecompression end. Therefore, the value of the field F indicates thatthe EHC header includes the compressed Ethernet header or indicateswhether the Ethernet header is compressed. Whether the Ethernet headerfield is an original Ethernet header or a compressed Ethernet headerobtained after the to-be-compressed field is removed is indicated by theindication field F. Optionally, when the EHC header carries the CID, theEthernet header is the compressed Ethernet header; or when the EHCheader does not carry the CID, the Ethernet header is the completeEthernet header.

For example, a format of the EHC header is that shown in FIG. 23. Alength value of a context identifier (context ID/CID) field is 2 to 16bits. For example, a length of the context ID field is 5 bits, 6 bits, 7bits, 8 bits, or 16 bits. This field indicates an identifiercorresponding to compression information used for header compression ofthe Ethernet frame. When the value of F indicates that the subsequentEthernet header is the original frame header, the decompression endignores a value of the CID field, or the EHC header does not include theCID field. In this case, to ensure byte alignment of the EHC header, anextra bit location is filled with a reserved bit. Whether the Ethernetheader field is the original Ethernet header or the compressed Ethernetheader obtained after the first to-be-compressed field is removed isindicated by the indication field F. A sequence of the foregoing fieldsare that the field F is located before the CID field, and the CID fieldis located before the Ethernet header field; or the CID field is locatedbefore the field F, and the field F is located before the Ethernetheader field. That is, the sequence of these fields is not limited inthis embodiment of this application.

In an optional implementation of this embodiment of this application, toensure byte alignment of the EHC, the EHC further includes one or morereserved bits, for example, at least one of a location before the fieldF, a location between the field F and the CID field, and a locationbetween the CID field and the Ethernet header has at least one reservedbit.

Optionally, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a MAC-I. Similar to the format of the PDCP data PDU in FIG. 9,details are not described herein again.

In this embodiment of this application, in a scenario in which thecompression end transmits the compressed Ethernet frame to thedecompression end and the decompression end decompresses the compressedEthernet frame, a check process is further set to improve a correct rateof compression and decompression. Therefore, in step S104, the EHCheader of the PDCP data PDU used to send the compressed Ethernet frameto the decompression end further includes check information.

FIG. 24 is a schematic diagram of a format of an EHC header including acheck code. The check code is located between a profile ID and anEthernet header. When the EHC header does not include the profile ID,the check code is located between a CID and the Ethernet header.Alternatively, the check code is located after the Ethernet header, orbetween a field F and the CID. That is, a sequence of these fields isnot limited in this embodiment of this application. During application,to align bytes of the EHC header, one or more reserved bitsalternatively is corresponding added to the EHC header. This is notlimited in this embodiment of this application.

In this embodiment of this application, the check information isgenerated based on one or more pieces of information in the firstcorrespondence.

For example, the check information is a cyclic redundancy check (cyclicredundancy check, CRC) or is a checksum (checksum).

In an optional implementation of this embodiment of this application,during an implementation in which the check information is the CRC,after receiving an Ethernet frame, the compression end generates firstcheck information CRC₁ of X (where X is determined based on actualapplication) bits by using a polynomial based on one or more of acorresponding compressed field value in a to-be-used correspondence, acomplete CID, a complete profile ID, an original Ethernet header, andthe like as input.

Correspondingly, after receiving a compressed Ethernet frame, thedecompression end further determines a to-be-used correspondence fordecompression based on a CID and/or a profile ID in an EHC header, andgenerate second check information CRC₂ of X bits by using a generationpolynomial that is the same as that of the compression end based on oneor more of a corresponding compressed field value in the correspondence,the complete CID, the complete profile ID, a decompressed Ethernetheader, and the like as input. If the CRC₂ is not equal to the CRCs, adetermination is the decompression fails. Alternatively, if thedecompression end is unable to find context information corresponding tothe CID, a determination is the decompression fails.

In another optional implementation of this embodiment of thisapplication, during an implementation in which the check information isthe checksum, after receiving an Ethernet frame, the compression endgenerates first check information checksum₁ of X (where X is determinedbased on actual application) bits by using a checksum algorithm based onone or more of a corresponding compressed field value in a to-be-usedcorrespondence, a complete CID, a complete profile ID, an originalEthernet header, and the like as input.

Correspondingly, after receiving a compressed Ethernet frame, thedecompression end further determines a to-be-used correspondence fordecompression based on a CID and/or a profile ID in an EHC header, andgenerate second check information checksum₂ of X bits by using achecksum algorithm that is the same as that of the compression end basedon one or more of a corresponding compressed field value in thecorrespondence, the complete CID, the complete profile ID, adecompressed Ethernet header, and the like as input. If the checksum₂ isnot equal to the checksum₁, a determination is the decompression fails.Alternatively, if the decompression end is unable to find contextinformation corresponding to the CID, a determination is thedecompression fails.

In an optional implementation, the decompression end decompresses theEthernet header of the to-be-decompressed Ethernet frame based on thevalue of the first to-be-decompressed field when the first checkinformation is the same as the second check information; or thedecompression end deletes the first correspondence, and/or thedecompression end sends an error report to the compression end when thefirst check information is different from the second check information.

In this embodiment of this application, when the first check informationis different from the second check information, the decompression enddetermines that the check fails, and the decompression end deletes thefirst correspondence stored by the decompression end, send the errorreport to the compression end, or delete the first correspondence storedby the decompression end and send the error report to the compressionend. This is not limited in this embodiment of this application.

In this embodiment of this application, the error report is used toindicate that the check fails, and the decompression end is unable todecompress the compressed Ethernet frame. The error report carries theCID and/or the profile ID. Optionally, the error report further carriesa CRC 3, where the CRC 3 is generated by using a generation polynomialbased on the error report as input.

In an optional implementation of this embodiment of this application,when the compression end receives the error report returned by thedecompression end based on the check information, the compression enddeletes the first correspondence, or the compression end sets the firstcorrespondence to being unavailable.

In this embodiment of this application, the compression end may set anindication variable corresponding to the first correspondence to asecond value, to indicate that the first correspondence is unavailable.During application, if the first correspondence further corresponds to aquantity of sending times of sending the first correspondence to thedecompression end, the quantity of sending times are set to an initialvalue. For example, the initial value is 0.

In an optional implementation of this embodiment of this application,when determining a check error, the decompression end clearscorrespondences stored by the decompression end, and feed back an errorreport to the compression end, where the error report does not carry theCID or the profile ID. Correspondingly, after receiving the errorreport, the compression end clears correspondences, or setcorrespondences to being unavailable. If the correspondence furthercorresponds to a quantity of sending times, the quantity of sendingtimes is set to an initial value (for example, 0).

In this embodiment of this application, a check mechanism is introduced,to avoid an error in decompressing a data packet due to inconsistentcorrespondences stored by the compression end and the decompression end,and improve a correct rate of compression and decompression.

Before performing the foregoing compression and decompression, thecompression end and the decompression end in this embodiment of thisapplication is further preconfigured with a capability of performingEHC. In an optional configuration implementation of this embodiment ofthis application, the compression end is a terminal, the decompressionend is a network device, and the method further includes:

-   -   sending, by the compression end, capability information to the        decompression end, where the capability information includes at        least one of the following: a capability of the compression end        supporting EHC, a quantity of data radio bearers (DRBs)        supporting the EHC at the compression end, profile information        supported by the compression end, a maximum value MAX_CID of        entries of correspondences supported by each DRB supporting the        EHC, a capability of the compression end supporting dynamic        configuration of a profile parameter, and a sum of entries of        correspondences maintained by DRBs supporting the EHC at the        compression end.

In this embodiment of this application, the capability of thecompression end supporting the EHC includes a capability of thecompression end supporting uplink EHC, and/or a capability of thecompression end supporting downlink EHC. The quantity of DRBs supportingthe EHC at the compression end is used to indicate a maximum quantity ofDRBs that is configured at the compression end to perform an EHCoperation. When the compression end does not indicate the information, amaximum quantity of DRBs supporting the EHC at the compression end isspecified in a protocol, or an indication that the quantity of DRBssupporting the EHC at the compression end is not limited. The profileinformation supported by the compression end includes uplink profileinformation supported by the compression end, and/or downlink profileinformation supported by the compression end that is used to indicateprofiles corresponding to Ethernet protocol frames on which thecompression end performs EHC processing. If the information is notindicated, an indication the compression end supports EHC processing onEthernet protocol frames corresponding to profiles set in a protocol.Other capabilities, for example, a quantity MAX_CID supported by oneDRB, and a total quantity of supported CIDs are separately indicated interms of an uplink and/or a downlink. For the maximum value MAX_CID ofentries of correspondence supported by each DRB supporting the EHC, whenthe compression end does not indicate the MAX_CID, the MAX_CID supportedby one DRB is in the protocol, or an indication that there is nolimitation. When the compression end does not indicate information aboutthe capability of the compression end supporting the dynamicconfiguration of the profile parameter, an indication that thecompression end supports/does support the network device in dynamicallyconfigure the profile parameter. When the compression end stores andmaintains a correspondence, a memory is used to store thecorrespondence. From a perspective of the terminal device, a supportedmemory is limited. Therefore, a memory that is used to store thecorrespondence further is limited. When the compression end does notindicate the sum of entries of correspondences maintained by the DRBssupporting the EHC at the compression end, a total quantity ofcorrespondences supported by the compression end is in the protocol, oran indication that there is no limitation.

Optionally, the capability information further includes a capability ofthe compression end supporting processing of feedback information of thedecompression end. When the compression end does not indicate theinformation, an indication that the compression end supports/doessupport processing of the feedback information. The capabilityinformation further includes a capability of the compression endsupporting sending of the first correspondence for a plurality of times.When the compression end does not indicate the information, anindication that the compression end supports/does support sending of thefirst correspondence for the plurality of times.

During application, the compression end sends the capability informationto the decompression end by using a radio resource control (RRC)message, or sends the capability information to the decompression end inanother manner. This is not limited in this embodiment of thisapplication.

Correspondingly, the decompression end configures, for the compressionend, at least one of the following: information about a DRB or a packetdata convergence protocol PDCP entity supporting the uplink EHC,information about a DRB or a PDCP entity supporting the downlink EHC,profile information supported by the DRB or the PDCP entity supportingthe uplink EHC, profile information supported by the DRB or the PDCPentity supporting the downlink EHC, a maximum value of entries ofcompression context information used when each DRB or PDCP entityperforms an EHC operation, a sum of entries of compression contextinformation maintained by a DRB supporting the EHC at the compressionend, a feedback operation performed for the EHC, a plurality of sendingoperations of sending the first correspondence that are performed forthe EHC, and a threshold of sending times used when the firstcorrespondence is sent for a plurality of times. Optionally, thedecompression end configures the foregoing content for the compressionend by using RRC signaling.

In an optional implementation in this embodiment of this application,when the MAX_CID is configured at the compression end, if found thatentries of previously stored correspondences have reached the MAX_CID,no new correspondence is established for a subsequent data packet, andan existing correspondence is used to compress the data packet. If acorrespondence is unable to be found for a new arrival data packet,compression processing is not performed. For example, if CIDs at thecompression end are used up, compression processing is unable to beperformed on the subsequent data packet, and the first correspondence isfurther not carried when the data packet is sent, or the terminal isunable to perform compression processing on a part of data packets basedon the implementation. In this case, there is two considerations for anencapsulation format of the data packet. In one case, considering thatthe EHC header in the PDCP data PDU does not include the profile IDfield, the field F in the EHC header indicates that the data packet isan uncompressed data packet, and the value of the context ID field is areserved value, for example, all 0s or all 1s, the compression endreceives the data packet, and determines, based on the value of thefield F and the reserved value of the CID, that the data packet is theuncompressed data packet and does not carry the first correspondence. Inanother case, considering that the EHC header in the PDCP data PDUincludes the profile ID field, the field F in the EHC header indicatesthat the data packet is an uncompressed data packet, and thevalues/value of the context ID field and/or the profile ID field are/isreserved values/a reserved value, for example, all 0s or all 1s, thecompression end receives the data packet, and determines, based on thevalue of the field F and the reserved value of the CID and/or thereserved value of the profile ID, that the data packet is theuncompressed data packet and does not carry the first correspondence.

In another optional implementation of this embodiment of thisapplication, when the MAX_CID is configured at the compression end, iffound that entries of previously stored correspondences have reached theMAX_CID, the compression end still generates the first correspondence,and replaces any entry of the previously stored correspondences with thefirst correspondence, to store the first correspondence. The any entryis randomly selected by the compression end or determined in anothermanner. This is not limited in this embodiment of this application.

In an optional implementation of this embodiment of this application,the method further includes: receiving, by the terminal, configurationinformation, where the configuration information is further used toindicate whether the EHC header carries the profile ID, or theconfiguration information further includes the profile ID and the EHCheader does not include the profile ID.

In this embodiment of this application, when RRC is used to configurethat one DRB supports one profile, an EHC header of a data packet of theDRB does not carry the profile ID; when RRC is not used to configurethat one DRB supports one profile, an EHC header needs to carry theprofile ID.

In a implementation in which the configuration information is furtherused to indicate whether the EHC header carries the profile ID, theterminal receives the configuration information sent by the networkdevice by using the RRC, and the RRC indicates, by using a field,whether the EHC header carries the profile ID. For example, a presenceof profile ID field is used to indicate whether the EHC header carriesthe profile ID. For example, if the presence of profile ID field iscarried in a PDCP configuration information element, an indication thatthe EHC header carries the profile ID; if the presence of profile IDfield is not carried, the EHC header does not carry the profile ID.

Optionally, a value of the presence of profile ID is further set to 1 or0, where 1 indicates that the EHC header carries the profile ID, and 0indicates that the EHC header does not carry the profile ID.Alternatively, 0 indicates that the EHC header carries the profile ID,and 1 indicates that the EHC header does not carry the profile ID.

Optionally, a presence of profile ID field is further separatelyconfigured for an uplink EHC operation and a downlink EHC operation ofthe terminal, to indicate whether an uplink EHC header and a downlinkEHC header each carry a profile ID. For example, a presence of profileID-UL field is configured to indicate whether the uplink EHC headercarries the profile ID, and a presence of profile ID-DL field isconfigured to indicate whether the downlink EHC header carries theprofile ID. Alternatively, a value of the presence of profile ID-UL isset to 1 or 0, where 1 indicates that the uplink EHC header carries theprofile ID, and 0 indicates that the uplink EHC header does not carrythe profile ID; or 0 indicates that the uplink EHC header carries theprofile ID, and 1 indicates that the uplink EHC header does not carrythe profile ID. A value of the presence of profile ID-DL is 1 or 0,where 1 indicates that the downlink EHC header carries the profile ID,and 0 indicates that the downlink EHC header does not carry the profileID; or 0 indicates that the downlink EHC header carries the profile ID,and 1 indicates that the downlink EHC header does not carry the profileID. Values of the fields are not limited in this embodiment of thisapplication.

Optionally, whether an EHC data packet of the DRB carries the profile IDfield is implicitly determined based on a quantity, configured by usingthe RRC, of profiles supported by the DRB. For example, if the quantity,configured by using the RRC, of profiles supported by the DRB is 1, aconsideration is that the profile ID is not carried. If the quantity,configured by using the RRC, of profiles supported by the DRB is a valuegreater than 1, a consideration is that the profile ID is carried.

In a implementation in which the configuration information furtherincludes the profile ID and the EHC header does not include the profileID, the profile ID of the terminal is configured by using theconfiguration information, so that the EHC header is excluded theprofile ID, to reduce a size of the EHC header and reduce occupation ofcommunication resources.

In an optional configuration implementation of this embodiment of thisapplication, the compression end is a network device, the decompressionend is a terminal, and the method further includes:

-   -   receiving, by the compression end, capability information, where        the capability information includes at least one of the        following: a capability of the decompression end supporting EHC,        a quantity of data radio bearers DRBs supporting the EHC at the        decompression end, profile information supported by the        decompression end, a maximum value MAX_CID of entries of        correspondences supported by each DRB supporting the EHC, a        capability of the decompression end supporting dynamic        configuration of a profile parameter, and a sum of entries of        correspondences maintained by DRBs supporting the EHC at the        decompression end.

In this embodiment of this application, after receiving the capabilityinformation of the decompression end, the compression endcorrespondingly configures, for the decompression end, at least one ofthe following: information about a DRB or a packet data convergenceprotocol PDCP entity supporting the uplink EHC, information about a DRBor a PDCP entity supporting the downlink EHC, profile informationsupported by the DRB or the PDCP entity supporting the uplink EHC,profile information supported by the DRB or the PDCP entity supportingthe downlink EHC, a maximum value of entries of compression contextinformation used when each DRB or PDCP entity performs an EHC operation,and a sum of entries of compression context information maintained by aDRB supporting the EHC at the compression end. Optionally, thecompression end configures the foregoing content for the decompressionend by using RRC signaling.

In an optional implementation of this embodiment of this application,the method further includes: sending, by the network device,configuration information to the terminal, where the configurationinformation is further used to indicate whether the EHC header carries aprofile ID, or the configuration information further includes a profileID and the EHC header does not include the profile ID.

For a configuration process, refer to the configuration process in theforegoing embodiment. Details are not described herein again.

In an optional configuration implementation of this embodiment of thisapplication, the compression end is a terminal, the decompression end isa terminal, and the method further includes:

-   -   receiving, by the compression end, capability information, where        the capability information includes at least one of the        following: a capability of the decompression end supporting EHC,        a quantity of data radio bearers DRBs supporting the EHC at the        decompression end, profile information supported by the        decompression end, a maximum value MAX_CID of entries of        correspondences supported by each DRB supporting the EHC, a        capability of the decompression end supporting dynamic        configuration of a profile parameter, and a sum of entries of        correspondences maintained by DRBs supporting the EHC at the        decompression end.

In this embodiment of this application, in a scenario in which twoterminals communicates with each other through a sidelink, the twoterminals exchanges a capability of supporting EHC by using sidelinkmessages, for example, the two terminals directly exchange an EHCcapability of a sidelink interface by using sidelink RRC messages, orthe two terminals exchange an EHC capability of a sidelink interfacethrough a base station or another terminal. In other words, in thisembodiment of this application, the compression end receives thecapability information of the decompression end by using a sidelinkmessage, or receive the capability information of the decompression endthrough the base station or the another terminal. This is not limited inthis embodiment of this application.

Correspondingly, the decompression end further receives the capabilityinformation of the compression end, to exchange the capabilityinformation between the decompression end and the compression end.Details are not described herein again.

In an optional implementation of this embodiment of this application,the compression end and the decompression end further exchangesconfiguration information, where the configuration information isfurther used to indicate whether the EHC header carries the profile ID,or the configuration information further includes the profile ID and theEHC header does not include the profile ID. Details are not describedherein again.

For a configuration process, refer to the configuration process in theforegoing embodiment. Details are not described herein again.

In an optional implementation of this embodiment of this application,there is a scenario in which the compression end or the decompressionend is handed over. In an example, when the compression end is aterminal, and the decompression end is a network device, the compressionend is handed over to different network devices. Correspondingly, inthis handover procedure, a decompression end that initially communicateswith the compression end is referred as a source station, and adecompression end to which the compression end is to be handed over forcommunication is referred to as a target station. The source station maydeliver a correspondence of a part or all of DRBs in the source stationto the target station by using a handover request (HR) message. Further,the target station configures EHC continue (continue) for a part or allDRBs at the compression end. In this case, the compression end does notneed to clear a correspondence of a corresponding DRB, and continues toperform an EHC operation by using an original correspondence, to reducea quantity of times of generating the correspondence by the compressionend and reduce occupation of computing resources. Alternatively, thetarget station is unable to configure EHC continue for a part or allDRBs at the compression end. In this case, the compression end clears acorrespondence of a corresponding DRB, to reduce occupation of storagespace.

In an optional implementation of this embodiment of this application,there is a scenario in which the compression end and the decompressionend are reestablished. When the compression end and the decompressionend are reestablished, the correspondence stored by the compression endand the correspondence stored by the decompression end remainsunchanged. In this way, the compression end and the decompression endcontinues to perform an EHC operation by using the originalcorrespondence after reestablishment, so that a quantity of times ofgenerating the correspondence by the compression end is reduced, andoccupation of computing resources is reduced. When the compression endand the decompression end are reestablished, the correspondence storedby the compression end and the correspondence stored by thedecompression end alternatively is cleared, to reduce occupation ofstorage space.

An embodiment of this application further provides an apparatusconfigured to implement any one of the foregoing methods. For example,an apparatus is provided, and includes units (or means) configured toimplement the steps performed by the terminal in any one of theforegoing methods. For another example, another apparatus is furtherprovided, and includes units (or means) configured to implement thesteps performed by the access network device in any one of the foregoingmethods. For another example, another apparatus is further provided, andincludes units (or means) configured to implement the steps performed bythe core network device in any one of the foregoing methods.

For example, FIG. 25 is a schematic diagram of an Ethernet headercompression apparatus according to an embodiment of this application.The apparatus is used at a compression end. As shown in FIG. 25, theapparatus 2500 includes a receiving unit 2510, a determining unit 2520,and a compression unit 2530. The receiving unit 2510 is configured toreceive a first Ethernet frame, where an Ethernet header of the firstEthernet frame includes a first to-be-compressed field. The determiningunit 2520 is configured to determine first compression information ofthe Ethernet header of the first Ethernet frame based on a firstcorrespondence and the first to-be-compressed field, where the firstcorrespondence includes a correspondence between the first compressioninformation and a value of the first to-be-compressed field, and thefirst compression information includes a first context identifier CID.The compression unit 2530 is configured to compress the Ethernet headerof the first Ethernet frame based on the first compression information.

Optionally, the apparatus 1700 further includes a first relationshipgeneration unit, configured to generate the first correspondence when acorrespondence stored by the compression end does not include the valueof the first to-be-compressed field of the first Ethernet frame, wherethe correspondence stored by the compression end includes acorrespondence between at least one piece of compression information anda value of a to-be-compressed field.

Optionally, the apparatus further includes a sending unit, configured tosend the first correspondence to a decompression end.

Optionally, the sending unit is configured to send an uncompressed datapacket to the decompression end, where the uncompressed data packetincludes the first correspondence.

Optionally, the sending unit is further configured to send the firstcorrespondence to the decompression end by using a first packet dataconvergence protocol data protocol data unit PDCP data PDU, where thefirst PDCP data PDU includes a first Ethernet header compression EHCheader, the first EHC header includes a first indication field, thefirst CID, and an Ethernet header of a second Ethernet frame, a value ofa to-be-compressed field in the Ethernet header of the second Ethernetframe is equal to the value of the first to-be-compressed field, and thefirst indication field is used to indicate whether the first EHC headerincludes a complete Ethernet header.

Optionally, the first EHC header further includes a first profileidentifier profile ID.

Optionally, the first indication field is further used to indicate thatthe first EHC header includes the first profile ID.

Optionally, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, the sending unit is further configured to send the firstcorrespondence to the decompression end by using a packet dataconvergence protocol control protocol data unit PDCP control PDU, wherethe PDCP control PDU includes first indication information, the firstCID, and the value of the first to-be-compressed field, and the firstindication information is used to indicate that the PDCP control PDU isused to transmit the first correspondence.

Optionally, the PDCP control PDU further includes a profile ID.

Optionally, the sending unit is further configured to send a first PDCPdata PDU to the decompression end, where the first PDCP data PDUincludes a first EHC header, the first EHC header includes a firstindication field and an Ethernet header of a second Ethernet frame, avalue of a to-be-compressed field in the Ethernet header of the secondEthernet frame is equal to the value of the first to-be-compressedfield, and the first indication field is used to indicate whether thefirst EHC header carries the first CID.

Optionally, when the first EHC header carries the first CID, theEthernet header of the second Ethernet frame is a compressed Ethernetheader; or when the first EHC header does not carry the first CID, theEthernet header of the second Ethernet frame is a complete Ethernetheader.

Optionally, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, the sending unit is further configured to send the firstcorrespondence to the decompression end for a plurality of times.

Optionally, the receiving unit is further configured to receive feedbackinformation from the decompression end, where the feedback informationis used to indicate a receiving status of the first correspondence.

The feedback information includes the first CID.

Optionally, the feedback information further includes at least one ofthe following: the first profile ID, a second indication field, and athird indication field, the second indication field is used to indicatethat the first correspondence is a newly added correspondence or amodified correspondence at the decompression end, and the thirdindication field is used to indicate that the feedback information is apositive feedback or a negative feedback.

Optionally, the compression end further stores an indication variable ofthe correspondence, and the indication variable is used to indicatewhether compression information of the correspondence is used forcompression.

Optionally, the sending unit is further configured to send the firstcorrespondence to a decompression end when a correspondence stored bythe compression end includes the first correspondence corresponding tothe first to-be-compressed field, and an indication variable of thefirst correspondence is used to indicate that compression information ofthe first correspondence is not used for compression.

Optionally, the apparatus further includes a variable setting unit,configured to set, by the compression end, the indication variable to afirst value when the compression end determines that the firstcorrespondence is correctly received by the decompression end, where thefirst value is used to indicate that the compression information is usedfor compression.

Optionally, the first compression information further includes the firstprofile ID.

Optionally, the sending unit is further configured to send secondindication information to the decompression end, where the secondindication information is used to indicate that the first correspondenceis a newly added correspondence or a modified correspondence at thecompression end.

Optionally, the sending unit is further configured to send a compressedfirst Ethernet frame to the decompression end, where the compressedfirst Ethernet frame includes the first CID and does not include aprofile identifier profile ID.

Optionally, that the sending unit is further configured to send acompressed first Ethernet frame to the decompression end includes: Thecompression end sends the compressed first Ethernet frame to thedecompression end by using a second PDCP data PDU.

Optionally, the second PDCP data PDU includes a second EHC header, andthe second EHC header further includes check information.

Optionally, the check information is generated based on one or morepieces of information in the first correspondence.

Optionally, the apparatus further includes a setting unit, configuredto: when the compression end receives an error report returned by thedecompression end based on the check information, delete the firstcorrespondence, or set the first correspondence to being unavailable.

Optionally, the compression end is a terminal, the decompression end isa network device, and the sending unit is further configured to sendcapability information to the decompression end, where the capabilityinformation includes at least one of the following: a capability of thecompression end supporting EHC, a quantity of data radio bearers DRBssupporting the EHC at the compression end, profile information supportedby the compression end, a maximum value MAX_CID of a quantity ofcorrespondences supported by each DRB supporting the EHC, a capabilityof the compression end supporting dynamic configuration of a profileparameter, and a sum of quantities of correspondences maintained by DRBssupporting the EHC at the compression end.

Optionally, the receiving unit is further configured to receiveconfiguration information, where the configuration information is usedto indicate whether an EHC header carries a profile ID, or theconfiguration information includes a profile ID.

Optionally, the compression end is a network device or a terminal, andthe receiving unit is further configured to receive capabilityinformation, where the capability information includes at least one ofthe following: a capability of the compression end supporting EHC, aquantity of data radio bearers DRBs supporting the EHC at thecompression end, profile information supported by the compression end, amaximum value MAX_CID of a quantity of correspondences supported by eachDRB supporting the EHC, a capability of the compression end supportingdynamic configuration of a profile parameter, and a sum of quantities ofcorrespondences maintained by DRBs supporting the EHC at the compressionend.

Optionally, the sending unit is further configured to send configurationinformation to the decompression end, where the configurationinformation is further used to indicate whether an EHC header carries aprofile ID, or the configuration information includes a profile ID.

For a implementation, refer to the descriptions of the methodembodiments. Details are not described herein again.

For example, FIG. 26 is a schematic diagram of an Ethernet headerdecompression apparatus according to an embodiment of this application.The apparatus is used at a decompression end. As shown in FIG. 26, theapparatus 2600 includes a receiving unit 2610, a determining unit 2620,and a decompression unit 2630. The receiving unit 2610 is configured toreceive a first Ethernet frame and a first context identifier CID. Thedetermining unit 2620 is configured to determine, based on the firstCID, a first correspondence including the first CID, where the firstcorrespondence includes a correspondence between first compressioninformation and a value of a first to-be-decompressed field, and thefirst compression information includes the first CID. The decompressionunit 2630 is configured to decompress an Ethernet header of the firstEthernet frame based on the first compression information and the valueof the first to-be-decompressed field in the first correspondence.

Optionally, the receiving unit is further configured to receive thefirst correspondence from a compression end.

Optionally, the receiving unit is configured to receive an uncompresseddata packet, where the uncompressed data packet includes the firstcorrespondence.

Optionally, the receiving unit is further configured to receive thefirst correspondence from the compression end by using a PDCP data PDU,where the first PDCP data PDU includes a first Ethernet headercompression EHC header, the first EHC header includes a first indicationfield, the first CID, and an Ethernet header of a second Ethernet frame,a value of a to-be-compressed field in the Ethernet header of the secondEthernet frame is equal to the value of the first to-be-compressedfield, and the first indication field is used to indicate whether thefirst EHC header includes a complete Ethernet header.

Optionally, the first EHC header further includes a first profileidentifier profile ID.

Optionally, the first indication field is further used to indicate thatthe first EHC header includes the first profile ID.

Optionally, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, the receiving unit is further configured to receive thefirst correspondence sent by the compression end by using a PDCP controlPDU, where the PDCP control PDU includes first indication information, aCID, and the value of the first to-be-compressed field, and the firstindication information is used to indicate that the PDCP control PDU isused to transmit the first correspondence.

Optionally, the PDCP control PDU further includes a first profile ID.

Optionally, the receiving unit is further configured to receive a firstPDCP data PDU from the compression end, where the first PDCP data PDUincludes a first EHC header, the first EHC header includes a firstindication field and an Ethernet header of a second Ethernet frame, avalue of a to-be-compressed field in the Ethernet header of the secondEthernet frame is equal to the value of the first to-be-compressedfield, and the first indication field is used to indicate whether thefirst EHC header carries the first CID.

Optionally, when the first EHC header carries the first CID, theEthernet header of the second Ethernet frame is a compressed Ethernetheader; or when the first EHC header does not carry the first CID, theEthernet header of the second Ethernet frame is a complete Ethernetheader.

Optionally, the first PDCP data PDU further includes a PDCP header, aservice data adaptation protocol SDAP header, an Ethernet data payload,and a message authentication code for integrity MAC-I.

Optionally, the decompression end stores a correspondence between atleast one piece of compression information and a value of ato-be-decompressed field. A first correspondence setting unit is furtherincluded, and is configured to store the first correspondence when thecorrespondence stored by the decompression end does not include thefirst compression information; or modify a value of a to-be-decompressedfield corresponding to the first compression information to the value ofthe first to-be-decompressed field when the correspondence stored by thedecompression end includes the first compression information, and thevalue of the to-be-decompressed field corresponding to the firstcompression information is different from the value of the firstto-be-decompressed field.

Optionally, the apparatus further includes a sending unit, configured tosend feedback information to the compression end, where the feedbackinformation is used to indicate a receiving status of the firstcorrespondence.

Optionally, the feedback information includes the first CID.

Optionally, the feedback information further includes at least one ofthe following: a profile ID, a first indication field, and a secondindication field, the first indication field is used to indicate thatthe first correspondence is a newly added correspondence or a modifiedcorrespondence at the decompression end, and the second indication fieldis used to indicate that the feedback information is a positive feedbackor a negative feedback.

Optionally, the first Ethernet frame further includes first checkinformation.

Optionally, the first check information is generated based on one ormore pieces of information in the first correspondence.

Optionally, the apparatus further includes a check unit, configured to:generate second check information based on the one or more pieces ofinformation in the first correspondence; and decompress, by thecompression end, the Ethernet header of the first Ethernet frame whenthe first check information is the same as the second check information;or delete, by the compression end, the first correspondence, and/orsend, by the compression end, an error report to the compression endwhen the first check information is different from the second checkinformation.

Division into the units in the foregoing apparatus is merely logicalfunction division. During actual implementation, all or some of theunits are integrated into one physical entity, or is physicallyseparate. In addition, the units in the apparatus are implemented in aform of software invoked by a processing element, or is implemented in aform of hardware; or some units are implemented in a form of softwareinvoked by a processing element, and some units are implemented in aform of hardware. For example, each unit is a separately disposedprocessing element, or is integrated into a chip of the apparatuses forimplementation. In addition, each unit alternatively is stored in amemory in a form of a program to be invoked by a processing element ofthe apparatus to perform a function of the unit. In addition, all orsome of the units are integrated together, or is implementedindependently. The processing element herein further is referred to as aprocessor, and is an integrated circuit having a signal processingcapability. In an implementation process, the steps of the foregoingmethods or the foregoing units are implemented by using a hardwareintegrated logic circuit in the processing element, or is implemented ina form of software invoked by the processing element.

For example, a unit in any one of the foregoing apparatuses are one ormore integrated circuits configured to implement the foregoing methods,for example, one or more application-specific integrated circuits(ASICs), one or more microprocessors (DSPs), one or more fieldprogrammable gate arrays (FPGAs), or a combination of at least two ofthe integrated circuits. For another example, when a unit in theapparatus is implemented by a program scheduled by a processing element,the processing element is a general-purpose processor, for example, acentral processing unit (CPU) or another processor that invokes theprogram. For still another example, the units are integrated andimplemented in a form of a system-on-a-chip (SOC).

The foregoing unit for receiving (for example, the receiving unit or thecommunication unit) is an interface circuit of the apparatus, configuredto receive a signal from another apparatus. For example, when theapparatus is implemented in a form of a chip, the receiving unit is aninterface circuit that is of the chip and that is configured to receivea signal from another chip or apparatus. The foregoing unit for sending(for example, the sending unit or the communication unit) is aninterface circuit of the apparatus, configured to send a signal toanother apparatus. For example, when the apparatus is implemented in aform of a chip, the sending unit is an interface circuit that is of thechip and that is configured to send a signal to another chip orapparatus.

FIG. 27 is a schematic diagram of a structure of a network deviceaccording to an embodiment of this application. The network device isconfigured to implement operations of the network device in theforegoing embodiments. As shown in FIG. 27, the network device includesan antenna 2710, a radio frequency apparatus 2720, and a basebandapparatus 2730. The antenna 2710 is connected to the radio frequencyapparatus 2720. In an uplink direction, the radio frequency apparatus2720 receives, through the antenna 2710, information sent by a terminalapparatus, and sends, to the baseband apparatus 2730 for processing, theinformation sent by the terminal apparatus. In a downlink direction, thebaseband apparatus 2730 processes information of the terminal apparatus,and sends the information to the radio frequency apparatus 2720. Afterprocessing the information of the terminal apparatus, the radiofrequency apparatus 2720 sends the information to the terminal apparatusthrough the antenna 2710.

The baseband apparatus 2730 includes one or more processing elements2731, for example, includes a master CPU and another integrated circuit.In addition, the baseband apparatus 2730 further includes a storageelement 2732 and an interface 2733. The storage element 2732 isconfigured to store a program and data. The interface 2733 is configuredto exchange information with the radio frequency apparatus 2720, and theinterface is, for example, a common public radio interface (CPRI). Theforegoing apparatus used for the network device is located in thebaseband apparatus 2730. For example, the foregoing apparatus used forthe network device is a chip on the baseband apparatus 2730. The chipincludes at least one processing element and interface circuit. Theprocessing element is configured to perform the steps of any one of themethods performed by the network device. The interface circuit isconfigured to communicate with another apparatus. In an implementation,units of the network device that implement the steps in the foregoingmethod is implemented by a program scheduled by a processing element.For example, the apparatus used for the network device includes aprocessing element and a storage element. The processing element invokesa program stored in the storage element, to perform the method performedby the network device in the foregoing method embodiments. The storageelement is a storage element located on a same chip as the processingelement, namely, an on-chip storage element, or is a storage elementlocated on a different chip from the processing element, namely, anoff-chip storage element.

In another implementation, units of the network device that implementthe steps in the foregoing methods are configured as one or moreprocessing elements. These processing elements are disposed in thebaseband apparatus. The processing element herein is an integratedcircuit, for example, one or more ASICs, one or more DSPs, one or moreFPGAs, or a combination of these types of integrated circuits. Theseintegrated circuits are integrated together to form a chip.

Units of the network device that implement the steps in the foregoingmethods are integrated together, and implemented in a form of asystem-on-a-chip (SOC). For example, the baseband apparatus includes theSOC chip, configured to implement the foregoing methods. At least oneprocessing element and a storage element is integrated into the chip,and the processing element invokes a program stored in the storageelement to implement the foregoing methods performed by the networkdevice. Alternatively, at least one integrated circuit is integratedinto the chip, to implement the foregoing methods performed by thenetwork device. Alternatively, with reference to the foregoingimplementations, functions of some units are implemented by a programinvoked by the processing element, and functions of some units areimplemented by the integrated circuit.

The foregoing apparatus used for the network device includes at leastone processing element and an interface circuit. The at least oneprocessing element is configured to perform any one of the methods thatare provided in the foregoing method embodiments and performed by thenetwork device. The processing element performs some or all stepsperformed by the network device, in a first manner by invoking theprogram stored in the storage element; or performs some or all stepsperformed by the network device, in a second manner by using a hardwareintegrated logic circuit in the processing element in combination withinstructions; or certainly performs, by combining the first manner andthe second manner, some or all steps performed by the network device.

As described above, the processing element herein is a general-purposeprocessor, for example, a CPU, or is one or more integrated circuitsconfigured to implement the foregoing methods, for example, one or moreASICs, one or more microprocessors DSPs, one or more FPGAs, or acombination of at least two of the integrated circuits. The storageelement is one memory, or is a general term of a plurality of storageelements.

FIG. 28 is a schematic diagram of a structure of a terminal apparatusaccording to an embodiment of this application. The terminal apparatusis configured to implement operations of the terminal in the foregoingembodiments. As shown in FIG. 28, the terminal apparatus includes anantenna 2810, a radio frequency part 2828, and a signal processing part2830. The antenna 2810 is connected to the radio frequency part 2828. Ina downlink direction, the radio frequency part 2828 receives, throughthe antenna 2810, information sent by an access network device, andsends, to the signal processing part 2830 for processing, theinformation sent by the access network device. In an uplink direction,the signal processing part 2830 processes information of the terminalapparatus, and sends the information to the radio frequency part 2828.After processing the information of the terminal apparatus, the radiofrequency part 2828 sends the information to the access network devicethrough the antenna 2810.

The signal processing section 2830 is configured to process data at eachcommunication protocol layer. The signal processing part 2830 is asubsystem of the terminal apparatus, and the terminal apparatus furtherincludes another subsystem. For example, a central processing subsystemis configured to process an operating system and an application layer ofthe terminal apparatus. For another example, a peripheral subsystem isconfigured to connect to another device. The signal processing part 2830is a chip disposed separately. Optionally, the foregoing apparatus is inthe signal processing part 2830.

The signal processing part 2830 includes one or more processing elements2831, for example, includes a master CPU and another integrated circuit.In addition, the signal processing part 2830 further includes a storageelement 2832 and an interface circuit 2833. The storage element 2832 isconfigured to store data and a program, and a program for performing themethod performed by the terminal apparatus in the foregoing method is oris unable to be stored in the storage element 2832, for example, storedin a memory outside the signal processing part 2830. During use, thesignal processing part 2830 loads the program into a cache for use. Theinterface circuit 2833 is configured to communicate with the apparatus.The foregoing apparatus is in the signal processing part 2830. Thesignal processing part 2830 is implemented by using a chip. The chipincludes at least one processing element and an interface circuit, theprocessing element is configured to perform steps of any methodperformed by the foregoing terminal apparatus, and the interface circuitis configured to communicate with another apparatus. In animplementation, units that implement the steps in the foregoing methodis implemented by a program scheduled by a processing element. Forexample, the apparatus includes a processing element and a storageelement. The processing element invokes a program stored in the storageelement, to perform the method performed by the terminal apparatus inthe foregoing method embodiments. The storage element is a storageelement located on a same chip as the processing element, namely, anon-chip storage element.

In another implementation, the program used to perform the methodperformed by the terminal apparatus in the foregoing methods are in astorage element located on a different chip from the processing element,namely, an off-chip storage element. In this case, the processingelement invokes or loads the program from the off-chip storage elementto the on-chip storage element, to invoke and perform the methodperformed by the terminal apparatus in the foregoing method embodiments.

In still another implementation, units of the terminal apparatus thatimplement the steps in the foregoing methods are configured as one ormore processing elements. These processing elements are disposed on thesignal processing part 2830. The processing element herein is anintegrated circuit, for example, one or more ASICs, one or more DSPs,one or more FPGAs, or a combination of these types of integratedcircuits. These integrated circuits are integrated together to form achip.

Units that implement the steps in the foregoing methods are integratedtogether, and implemented in a form of a system-on-a-chip (SOC). The SOCchip is configured to implement the foregoing methods. At least oneprocessing element and a storage element is integrated into the chip,and the processing element invokes a program stored in the storageelement to implement the foregoing methods performed by the terminalapparatus. Alternatively, at least one integrated circuit is integratedinto the chip, to implement the foregoing methods performed by theterminal apparatus. Alternatively, with reference to the foregoingimplementations, functions of some units are implemented by a programinvoked by the processing element, and functions of some units areimplemented by the integrated circuit.

The foregoing apparatus includes at least one processing element and aninterface circuit. The at least one processing element is configured toperform any one of the methods that are provided in the foregoing methodembodiments and performed by the terminal apparatus. The processingelement performs some or all steps performed by the terminal apparatus,in a first manner by invoking the program stored in the storage element;or performs some or all steps performed by the terminal apparatus, in asecond manner by using a hardware integrated logic circuit in theprocessing element in combination with instructions; or certainlyperforms, by combining the first manner and the second manner, some orall steps performed by the terminal apparatus.

As described above, the processing element herein is a general-purposeprocessor, for example, a CPU, or is one or more integrated circuitsconfigured to implement the foregoing methods, for example, one or moreASICs, one or more microprocessors DSPs, one or more FPGAs, or acombination of at least two of the integrated circuits. The storageelement is one memory, or is a general term of a plurality of storageelements.

FIG. 29 is a schematic diagram of a structure of a compression enddevice according to an embodiment of this application. The compressionend device is configured to implement operations of the compression endin the foregoing embodiments. As shown in FIG. 29, the compression enddevice includes a processor 2910, a memory 2920, and an interface 2930.The processor 2910, the memory 2920, and the interface 2930 areconnected by using signals.

The method performed by the compression end device in the foregoingembodiment is implemented by the processor 2910 invoking a programstored in the memory 2920. The apparatus used for the compression enddevice includes a memory and a processor. The memory is configured tostore a program, and the program is invoked by the processor to performthe method performed by the compression end device in the foregoingmethod embodiments. The processor herein is an integrated circuit havinga signal processing capability, for example, a CPU. The apparatus usedfor the compression end device is implemented by using one or moreintegrated circuits configured to implement the foregoing method, forexample, one or more ASICs, one or more microprocessors DSPs, one ormore FPGAs, or a combination of at least two of the integrated circuits.Alternatively, the foregoing implementations are combined.

FIG. 30 is a schematic diagram of a structure of a decompression enddevice according to an embodiment of this application. The decompressionend device is configured to implement operations of the decompressionend in the foregoing embodiments. As shown in FIG. 30, the decompressionend device includes a processor 3010, a memory 3020, and an interface3030. The processor 3010, the memory 3020, and the interface 3030 areconnected by using signals.

The method performed by the decompression end device in the foregoingembodiment is implemented by the processor 3010 invoking a programstored in the memory 3020. The apparatus used for the decompression enddevice includes a memory and a processor. The memory is configured tostore a program, and the program is invoked by the processor to performthe method performed by the decompression end device in the foregoingmethod embodiments. The processor herein is an integrated circuit havinga signal processing capability, for example, a CPU. The apparatus usedfor the decompression end device is implemented by using one or moreintegrated circuits configured to implement the foregoing method, forexample, one or more ASICs, one or more microprocessors DSPs, one ormore FPGAs, or a combination of at least two of the integrated circuits.Alternatively, the foregoing implementations are combined.

A person of ordinary skill in the art understands that all or some ofthe steps of the method embodiments are implemented by a programinstructing related hardware. The program is stored in acomputer-readable storage medium. When the program is executed, thesteps of the method embodiments are performed. The foregoing storagemedium includes: any medium that stores program code, such as a ROM, aRAM, a magnetic disk, or an optical disc.

What is claimed is:
 1. An Ethernet header compression method,comprising: receiving, by a compression end, a first Ethernet frame,wherein an Ethernet header of the first Ethernet frame comprises a firstto-be-compressed field; determining, by the compression end, firstcompression information of the Ethernet header of the first Ethernetframe based on a first correspondence and the first to-be-compressedfield, wherein the first correspondence comprises: a correspondencebetween the first compression information wherein the first compressioninformation comprises a first context identifier (CID); and a value ofthe first to-be-compressed field; and compressing, by the compressionend, the Ethernet header of the first Ethernet frame based on the firstcompression information.
 2. The method according to claim 1, wherein themethod further comprises: generating the first correspondence when acorrespondence stored by the compression end does not comprise the valueof the first to-be-compressed field of the first Ethernet frame, whereinthe correspondence stored by the compression end comprises: acorrespondence between at least one piece of compression information;and a value of a to-be-compressed field.
 3. The method according toclaim 1, wherein the method further comprises: sending, by thecompression end, the first correspondence to a decompression end.
 4. Themethod according to claim 3, wherein the sending, by the compressionend, the first correspondence to the decompression end comprises:sending, by the compression end, an uncompressed data packet to thedecompression end, wherein the uncompressed data packet comprises thefirst correspondence.
 5. The method according to claim 3, wherein thesending, by the compression end, the first correspondence to thedecompression end comprises: sending, by the compression end, the firstcorrespondence to the decompression end by using a first packet dataconvergence protocol (PDCP) data protocol data unit (PDU), wherein thefirst PDCP data PDU comprises: a first Ethernet header compression (EHC)header, the first EHC header comprises: a first indication field whereinthe first indication field is used to indicate whether the first EHCheader comprises a complete Ethernet header; the first CID; and anEthernet header of a second Ethernet frame, wherein a value of ato-be-compressed field in the Ethernet header of the second Ethernetframe is equal to the value of the first to-be-compressed field.
 6. Themethod according to claim 5, wherein the first EHC header furthercomprises a first profile identifier profile ID.
 7. An apparatus,applied for a compression end comprising: at least one processor; and amemory storing instructions for execution by the at least one processor;wherein, when executed, the instructions cause the apparatus to performoperations comprising: receiving, a first Ethernet frame, wherein anEthernet header of the first Ethernet frame comprises a firstto-be-compressed field; determining, first compression information ofthe Ethernet header of the first Ethernet frame based on a firstcorrespondence and the first to-be-compressed field, wherein the firstcorrespondence comprises: a correspondence between the first compressioninformation wherein the first compression information comprises a firstcontext identifier CID; and a value of the first to-be-compressed field;and compressing, the Ethernet header of the first Ethernet frame basedon the first compression information.
 8. The apparatus according toclaim 7, wherein, when executed, the instructions cause the apparatus toperform operations comprising: generating the first correspondence whena correspondence stored by the apparatus does not comprise the value ofthe first to-be-compressed field of the first Ethernet frame, whereinthe correspondence stored by the apparatus comprises: a correspondencebetween at least one piece of compression information; and a value of ato-be-compressed field.
 9. The apparatus according to claim 7, wherein,when executed, the instructions cause the apparatus to performoperations comprising: sending, the first correspondence to adecompression end.
 10. The apparatus according to claim 9, wherein thesending, the first correspondence to the decompression end comprises:sending, an uncompressed data packet to the decompression end, whereinthe uncompressed data packet comprises the first correspondence.
 11. Theapparatus according to claim 9, wherein the sending, the firstcorrespondence to the decompression end comprises: sending, the firstcorrespondence to the decompression end by using a first packet dataconvergence protocol (PDCP) data protocol data unit (PDU), wherein thefirst PDCP data PDU comprises: a first Ethernet header compression EHCheader, the first EHC header comprises: a first indication field whereinthe first indication field is used to indicate whether the first EHCheader comprises a complete Ethernet header; the first CID; and anEthernet header of a second Ethernet frame, wherein a value of ato-be-compressed field in the Ethernet header of the second Ethernetframe is equal to the value of the first to-be-compressed field.
 12. Theapparatus according to claim 11, wherein the first EHC header furthercomprises a first profile identifier profile ID.
 13. An apparatus,applied for a decompression end, comprising: at least one processor; anda memory storing instructions for execution by the at least oneprocessor; wherein, when executed, the instructions cause the apparatusto perform operations comprising: receiving, a first Ethernet frame,wherein the first Ethernet frame comprises a first context identifier(CID); determining, based on the first CID, a first correspondencecomprising the first CID, wherein the first correspondence comprises: acorrespondence between first compression information, wherein the firstcompression information comprises the first CID; and a value of a firstto-be-decompressed field; and decompressing, an Ethernet header of thefirst Ethernet frame based on the first compression information and thevalue of the first to-be-decompressed field in the first correspondence.14. The apparatus according to claim 13, wherein, when executed, theinstructions cause the apparatus to perform operations comprising:receiving, the first correspondence from a compression end.
 15. Theapparatus according to claim 14, wherein the receiving, the firstcorrespondence from the compression end comprises: receiving, anuncompressed data packet, wherein the uncompressed data packet comprisesthe first correspondence.
 16. The apparatus according to claim 14,wherein the receiving, the first correspondence from the compression endcomprises: receiving, the first correspondence from the compression endby using a first PDCP data PDU, wherein the first PDCP data PDUcomprises: a first Ethernet header compression (EHC) header, the firstEHC header comprises: a first indication field, wherein the firstindication field is used to indicate whether the first EHC headercomprises a complete Ethernet header; the first CID; and an Ethernetheader of a second Ethernet frame, a value of a to-be-compressed fieldin the Ethernet header of the second Ethernet frame is equal to thevalue of a first to-be-compressed field.
 17. The apparatus according toclaim 16, wherein the first EHC header further comprises a first profileidentifier (ID).
 18. The apparatus according to claim 17, wherein thefirst indication field is further used to indicate that the first EHCheader comprises the first profile ID.